void IGeometrySink.ArcTo(Point tangentStart, Point tangentEnd, Size radius) { Contract.Assert(_PathSink != null); _PathSink.AddLine(tangentStart.ToPointF()); ArcSegment segment; segment.Point = tangentEnd.ToPointF(); segment.Size = radius.ToSizeF(); segment.SweepDirection = SweepDirection.Clockwise; segment.RotationAngle = 0.0f; segment.ArcSize = ArcSize.Small; _PathSink.AddArc(segment); }
void IGeometrySink.BezierCurveTo(Point controlPoint1, Point controlPoint2, Point endPoint) { Contract.Assert(_PathSink != null); BezierSegment segment; segment.Point1 = controlPoint1.ToPointF(); segment.Point2 = controlPoint2.ToPointF(); segment.Point3 = endPoint.ToPointF(); _PathSink.AddBezier(segment); }
void IGeometrySink.MoveTo(Point point) { Contract.Assert(_PathSink != null); if(_IsSinkInFigure) { _PathSink.EndFigure(FigureEnd.Open); _IsSinkInFigure = false; } _PathSink.BeginFigure(point.ToPointF(), FigureBegin.Filled); _IsSinkInFigure = true; }
void IGeometrySink.QuadraticCurveTo(Point controlPoint, Point endPoint) { Contract.Assert(_PathSink != null); QuadraticBezierSegment segment; segment.Point1 = controlPoint.ToPointF(); segment.Point2 = endPoint.ToPointF(); _PathSink.AddQuadraticBezier(segment); }
void IGeometrySink.LineTo(Point endPoint) { Contract.Assert(_PathSink != null); _PathSink.AddLine(endPoint.ToPointF()); }