예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }
예제 #4
0
        void IGeometrySink.QuadraticCurveTo(Point controlPoint, Point endPoint)
        {
            Contract.Assert(_PathSink != null);

            QuadraticBezierSegment segment;

            segment.Point1 = controlPoint.ToPointF();
            segment.Point2 = endPoint.ToPointF();

            _PathSink.AddQuadraticBezier(segment);
        }
예제 #5
0
        void IGeometrySink.LineTo(Point endPoint)
        {
            Contract.Assert(_PathSink != null);

            _PathSink.AddLine(endPoint.ToPointF());
        }