Enum Anchor
- Namespace
- Egami.Operations
- Assembly
- Egami.dll
Where an image sits inside a larger area, or which part of it is kept when it is cut down.
public enum Anchor
Fields
Bottom = 7The middle of the bottom edge.
BottomLeft = 6The bottom-left corner.
BottomRight = 8The bottom-right corner.
Center = 0The center.
Left = 4The middle of the left edge.
Right = 5The middle of the right edge.
Top = 2The middle of the top edge.
TopLeft = 1The top-left corner.
TopRight = 3The top-right corner.
Examples
photo.Apply(ops => ops
.Crop(10, 10, 120, 90) // keep a rectangle
.Pad(140, 110, Rgba8.White, Anchor.Center) // add a white border
.Rotate(90) // exact for multiples of 90°
.Rotate(-3.5f, ResampleFilter.Bicubic, Rgba8.Transparent) // resampled for other angles
.FlipHorizontal(), Ct);