Enum PenAlignment
Defines how a pen's stroke is positioned relative to the shape boundary.
public enum PenAlignment
Fields
Center = 0Stroke is centered on the path.
Inside = 1Stroke lies fully inside the filled region of the shape.
Outside = 2Stroke lies fully outside the filled region of the shape.
Examples
var pen = new Pen(new Color32(255, 0, 0), 4) { Alignment = PenAlignment.Inside };
canvas.DrawRectangle(Rectangle.FromSize(10, 10, 100, 50), pen);