PeachDrawing.Core

PeachDrawing.Core

PathCommand Struct

One drawing step of a CurveContour: a straight line or a cubic Bézier from the previous point (the contour’s Start for the first step) to End. Elliptical arcs never appear as their own kind: GraphicsPath records every arc as the cubic Béziers that approximate it.

public readonly record struct PathCommand : System.IEquatable<PeachDrawing.Core.PathCommand>

Implements System.IEquatable<PathCommand>

Constructors  
PathCommand(PathCommandKind, PaintPoint, PaintPoint, PaintPoint) One drawing step of a CurveContour: a straight line or a cubic Bézier from the previous point (the contour’s Start for the first step) to End. Elliptical arcs never appear as their own kind: GraphicsPath records every arc as the cubic Béziers that approximate it.
Properties  
Control1 the curve’s first control point; equal to End for a line
Control2 the curve’s second control point; equal to End for a line
End where the step ends
Kind whether this step is a line or a cubic curve
Methods  
CubicTo(PaintPoint, PaintPoint, PaintPoint) A cubic Bézier curve to end.
LineTo(PaintPoint) A straight line to end.