Table of Contents

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 = 7

The middle of the bottom edge.

BottomLeft = 6

The bottom-left corner.

BottomRight = 8

The bottom-right corner.

Center = 0

The center.

Left = 4

The middle of the left edge.

Right = 5

The middle of the right edge.

Top = 2

The middle of the top edge.

TopLeft = 1

The top-left corner.

TopRight = 3

The 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);