src/main/java/com/mxgraph/util/svg/ExtendedGeneralPath.java
public void append(ExtendedPathIterator epi, boolean connect)
	{
		float[] vals = new float[7];
		while (!epi.isDone())
		{
			Arrays.fill(vals, 0);
			int type = epi.currentSegment(vals);
			epi.next();
			if (connect && (numVals != 0))
			{
				if (type == PathIterator.SEG_MOVETO)
				{
					float x = vals[0];
					float y = vals[1];
					if ((x != cx) || (y != cy))
					{
						// Change MOVETO to LINETO.
						type = PathIterator.SEG_LINETO;
					}
					else
					{
						// Redundant segment (move to current loc) drop it...
						if (epi.isDone())
							break; // Nothing interesting
						type = epi.currentSegment(vals);
						epi.next();
					}
				}
				connect = false;
			}

			switch (type)
			{
				case PathIterator.SEG_CLOSE:
					closePath();
					break;
				case PathIterator.SEG_MOVETO:
					moveTo(vals[0], vals[1]);
					break;
				case PathIterator.SEG_LINETO:
					lineTo(vals[0], vals[1]);
					break;
				case PathIterator.SEG_QUADTO:
					quadTo(vals[0], vals[1], vals[2], vals[3]);
					break;
				case PathIterator.SEG_CUBICTO:
					curveTo(vals[0], vals[1], vals[2], vals[3], vals[4],
							vals[5]);
					break;
				case ExtendedPathIterator.SEG_ARCTO:
					arcTo(vals[0], vals[1], vals[2], (vals[3] != 0),
							(vals[4] != 0), vals[5], vals[6]);
					break;
			}
		}
	}
/**
	 * Delegates to the enclosed <code>GeneralPath</code>.
	 */
Delegates to the enclosed GeneralPath.
Delegates to the enclosed GeneralPath .
public void append(ExtendedPathIterator epi, boolean connect)
	{
		float[] vals = new float[7];
		while (!epi.isDone())
		{
			Arrays.fill(vals, 0);
			int type = epi.currentSegment(vals);
			epi.next();
			if (connect && (numVals != 0))
			{
				if (type == PathIterator.SEG_MOVETO)
				{
					float x = vals[0];
					float y = vals[1];
					if ((x != cx) || (y != cy))
					{
						type = PathIterator.SEG_LINETO;
					}
					else
					{
						if (epi.isDone())
							break; 
						type = epi.currentSegment(vals);
						epi.next();
					}
				}
				connect = false;
			}
			switch (type)
			{
				case PathIterator.SEG_CLOSE:
					closePath();
					break;
				case PathIterator.SEG_MOVETO:
					moveTo(vals[0], vals[1]);
					break;
				case PathIterator.SEG_LINETO:
					lineTo(vals[0], vals[1]);
					break;
				case PathIterator.SEG_QUADTO:
					quadTo(vals[0], vals[1], vals[2], vals[3]);
					break;
				case PathIterator.SEG_CUBICTO:
					curveTo(vals[0], vals[1], vals[2], vals[3], vals[4],
							vals[5]);
					break;
				case ExtendedPathIterator.SEG_ARCTO:
					arcTo(vals[0], vals[1], vals[2], (vals[3] != 0),
							(vals[4] != 0), vals[5], vals[6]);
					break;
			}
		}
	}
public void append ( ExtendedPathIterator epi , boolean connect ) { float [ ] vals = new float [ 7 ] ; while ( ! epi . isDone ( ) ) { Arrays . fill ( vals , 0 ) ; int type = epi . currentSegment ( vals ) ; epi . next ( ) ; if ( connect && ( numVals != 0 ) ) { if ( type == PathIterator . SEG_MOVETO ) { float x = vals [ 0 ] ; float y = vals [ 1 ] ; if ( ( x != cx ) || ( y != cy ) ) { type = PathIterator . SEG_LINETO ; } else { if ( epi . isDone ( ) ) break ; type = epi . currentSegment ( vals ) ; epi . next ( ) ; } } connect = false ; } switch ( type ) { case PathIterator . SEG_CLOSE : closePath ( ) ; break ; case PathIterator . SEG_MOVETO : moveTo ( vals [ 0 ] , vals [ 1 ] ) ; break ; case PathIterator . SEG_LINETO : lineTo ( vals [ 0 ] , vals [ 1 ] ) ; break ; case PathIterator . SEG_QUADTO : quadTo ( vals [ 0 ] , vals [ 1 ] , vals [ 2 ] , vals [ 3 ] ) ; break ; case PathIterator . SEG_CUBICTO : curveTo ( vals [ 0 ] , vals [ 1 ] , vals [ 2 ] , vals [ 3 ] , vals [ 4 ] , vals [ 5 ] ) ; break ; case ExtendedPathIterator . SEG_ARCTO : arcTo ( vals [ 0 ] , vals [ 1 ] , vals [ 2 ] , ( vals [ 3 ] != 0 ) , ( vals [ 4 ] != 0 ) , vals [ 5 ] , vals [ 6 ] ) ; break ; } } }
Delegates to the enclosed <code>GeneralPath</code>.
Delegates to the enclosed <code > GeneralPath< / code > .
// Change MOVETO to LINETO. // Redundant segment (move to current loc) drop it... // Nothing interesting