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

append() public method

public append ( PathIterator pi, bool connect ) : void
pi PathIterator
connect bool
return void
		public void append(PathIterator pi, bool connect) 
		{
			ClearCache ();
			float [] coords = new float [6];
			while (!pi.isDone ()) {
				switch (pi.currentSegment (coords)) {
					case SEG_MOVETO:
						if (!connect || _typesCount < 1 || _coordsCount < 2) {
							moveTo (coords [0], coords [1]);
							break;
						}
						if (_types [_typesCount - 1] != SEG_CLOSE &&
							_coords [_coordsCount - 2] == coords [0] &&
							_coords [_coordsCount - 1] == coords [1])
							break;	
						goto case SEG_LINETO;
					case SEG_LINETO:
						lineTo (coords [0], coords [1]);
						break;
					case SEG_QUADTO:
						quadTo (coords [0], coords [1], coords [2], coords [3]);
						break;
					case SEG_CUBICTO:
						curveTo (coords [0], coords [1], coords [2], coords [3], coords [4], coords [5]);
						break;
					case SEG_CLOSE:
						closePath ();
					break;
				}
				pi.next	();
				connect = false;
			}
		}

Same methods

ExtendedGeneralPath::append ( Shape s ) : void
ExtendedGeneralPath::append ( Shape s, bool connect ) : void

Usage Example

        public void Flatten(Matrix matrix, float flatness)
        {
            AffineTransform tr = null;

            if (matrix != null)
            {
                tr = matrix.NativeObject;
            }

            //FIXME : Review (perfomance reasons).
            PathIterator        pi      = NativeObject.getPathIterator(tr, flatness);
            ExtendedGeneralPath newPath = new ExtendedGeneralPath();

            newPath.append(pi, false);
            Shape = newPath;
        }
All Usage Examples Of System.Drawing.Drawing2D.ExtendedGeneralPath::append