Beispiel #1
0
        private void  CurveEnd(PointFP control1, PointFP control2, PointFP curveEnd)
        {
            drawingCurve = false;
            if (needDrawStartCap)
            {
                startCapP1 = new PointFP(curveBegin);
                startCapP2 = new PointFP(control1);
                //AddLineCap(control1, curveBegin, startLineCap);
                needDrawStartCap = false;
            }
            LineFP head = new LineFP();
            LineFP tail = new LineFP();

            CalcHeadTail(curveBegin, control1, head, new LineFP());
            outline.AddMoveTo(head.P1);
            outline.AddPath(curvePath1);
            CalcHeadTail(control2, curveEnd, new LineFP(), tail);
            outline.AddLineTo(tail.P1);
            outline.AddLineTo(tail.P2);
            outline.ExtendIfNeeded(curvePath1.cmdsSize, curvePath1.pntsSize);
            int j = curvePath2.pntsSize - 1;

            for (int i = curvePath2.cmdsSize - 1; i >= 0; i--)
            {
                outline.AddLineTo(curvePath2.pnts[j--]);
            }
            outline.AddLineTo(head.P2);
            outline.AddClose();
            curvePath1    = null;
            curvePath2    = null;
            lastCurveTail = null;
            lastPoint     = new PointFP(control2);
            drawingCurve  = false;
        }