yu.ac.bg.etf.javaqx.qswing.graphics
Interface PathIterator

All Known Implementing Classes:
CubicCurve.CubicPathIterator, Ellipse.EllipsePathIterator, Line.LinePathIterator, QuadCurve.QuadPathIterator, Rectangle.RectanglePathIterator, RoundRectangle.RoundRectanglePathIterator

public interface PathIterator

Path Iterator Interface.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static int SEG_CLOSE
          The segment type "CLOSE".
static int SEG_CUBICTO
          The segment type "CUBICTO".
static int SEG_LINETO
          The segment type "LINETO".
static int SEG_MOVETO
          The segment type "MOVETO".
static int SEG_QUADTO
          The segment type "QUADTO".
static int WIND_EVEN_ODD
          Even-odd winding rule.
static int WIND_NON_ZERO
          Non-zero winding rule.
 
Method Summary
 int currentSegment(int[] coords)
          Returns the coordinates and type of the current path segment.
 int getWindingRule()
          Returns the winding rule.
 boolean isDone()
          Returns true if the iteration is complete.
 void next()
          Moves the iterator to the next segment of the path.
 

Field Detail

WIND_EVEN_ODD

public static final int WIND_EVEN_ODD
Even-odd winding rule.

See Also:
Constant Field Values

WIND_NON_ZERO

public static final int WIND_NON_ZERO
Non-zero winding rule.

See Also:
Constant Field Values

SEG_MOVETO

public static final int SEG_MOVETO
The segment type "MOVETO".

See Also:
Constant Field Values

SEG_LINETO

public static final int SEG_LINETO
The segment type "LINETO".

See Also:
Constant Field Values

SEG_QUADTO

public static final int SEG_QUADTO
The segment type "QUADTO".

See Also:
Constant Field Values

SEG_CUBICTO

public static final int SEG_CUBICTO
The segment type "CUBICTO".

See Also:
Constant Field Values

SEG_CLOSE

public static final int SEG_CLOSE
The segment type "CLOSE".

See Also:
Constant Field Values
Method Detail

getWindingRule

public int getWindingRule()
Returns the winding rule.

Returns:
the winding rule

isDone

public boolean isDone()
Returns true if the iteration is complete.

Returns:
true if the iteration is complete

next

public void next()
Moves the iterator to the next segment of the path.


currentSegment

public int currentSegment(int[] coords)
Returns the coordinates and type of the current path segment.

Parameters:
coords - an array of length 6 that can be used to store the coordinates of the points
Returns:
the path-segment type of the current path segment.


Copyright © 2007 ETF and contributors. All Rights Reserved.