System.Drawing.Drawing2D.ExtendedGeneralPath.curveTo C# (CSharp) Method

curveTo() public method

public curveTo ( float x1, float y1, float x2, float y2, float x3, float y3 ) : void
x1 float
y1 float
x2 float
y2 float
x3 float
y3 float
return void
		public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) 
		{
			ClearCache ();
			needRoom (1, 6, true);
			_types [_typesCount++] = SEG_CUBICTO;
			_coords [_coordsCount++] = x1;
			_coords [_coordsCount++] = y1;
			_coords [_coordsCount++] = x2;
			_coords [_coordsCount++] = y2;
			_coords [_coordsCount++] = x3;
			_coords [_coordsCount++] = y3;
		}

Usage Example

        public void CloseAllFigures()
        {
            ExtendedGeneralPath p  = new ExtendedGeneralPath();
            PathIterator        pi = NativeObject.getPathIterator(null);
            JPI lastSeg            = JPI.SEG_CLOSE;

            float [] points = new float[6];

            p.setWindingRule(pi.getWindingRule());
            while (!pi.isDone())
            {
                JPI curSeg = (JPI)pi.currentSegment(points);
                switch (curSeg)
                {
                case JPI.SEG_CLOSE:
                    p.closePath();
                    break;

                case JPI.SEG_MOVETO:
                    if (lastSeg != JPI.SEG_CLOSE)
                    {
                        p.closePath();
                    }
                    p.moveTo(points[0], points[1]);
                    break;

                case JPI.SEG_LINETO:
                    p.lineTo(points[0], points[1]);
                    break;

                case JPI.SEG_QUADTO:
                    p.quadTo(points[0], points[1], points[2], points[3]);
                    break;

                case JPI.SEG_CUBICTO:
                    p.curveTo(points[0], points[1], points[2], points[3], points[4], points[5]);
                    break;

                default:
                    break;
                }
                lastSeg = curSeg;
                pi.next();
            }

            p.closePath();
            Shape = p;
        }
All Usage Examples Of System.Drawing.Drawing2D.ExtendedGeneralPath::curveTo