Package snap.geom
Class PathIter
java.lang.Object
snap.geom.PathIter
- Direct Known Subclasses:
Polygon3D.PointArrayPathIter2D
A class to iterate over segments in a shape, providing specific coordinate information.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Seg
arcTo
(double lx, double ly, double cx, double cy, double x, double y, double[] coords) Returns a CubicTo for start, corner and end points.protected final Seg
close()
Returns a close.protected final Seg
cubicTo
(double aCPX0, double aCPY0, double aCPX1, double aCPY1, double aX, double aY, double[] coords) Returns a CubicTo for given coords.static double
getArcLength
(PathIter aPathIter) Returns total length of segments for given PathIter.static Rect
Returns bounds rect for given PathIter.abstract Seg
getNext
(double[] coords) Returns the next segment.getNext
(float[] coords) Returns the next segment (float coords).static PathIter
getPathIterForPathIterArray
(PathIter[] pathIters) Returns a combined PathIter for given array of PathIter.Returns the Transform associated with this PathIter.int
Returns the winding - how a path determines what to fill when segments intersect.abstract boolean
hasNext()
Returns whether has next segment.protected final Seg
lineTo
(double aX, double aY, double[] coords) Returns a LineTo for given coords.protected final Seg
moveTo
(double aX, double aY, double[] coords) Returns a MoveTo for given coords.protected final Seg
quadTo
(double aCPX, double aCPY, double aX, double aY, double[] coords) Returns a QuadTo for given coords.
-
Field Details
-
_trans
-
WIND_EVEN_ODD
public static final int WIND_EVEN_ODD- See Also:
-
WIND_NON_ZERO
public static final int WIND_NON_ZERO- See Also:
-
-
Constructor Details
-
PathIter
public PathIter()Creates a new PathIter. -
PathIter
Creates a new PathIter for given transform.
-
-
Method Details
-
getTransform
Returns the Transform associated with this PathIter. -
getWinding
public int getWinding()Returns the winding - how a path determines what to fill when segments intersect. -
getNext
Returns the next segment. -
getNext
Returns the next segment (float coords). -
hasNext
public abstract boolean hasNext()Returns whether has next segment. -
moveTo
Returns a MoveTo for given coords. -
lineTo
Returns a LineTo for given coords. -
quadTo
Returns a QuadTo for given coords. -
cubicTo
protected final Seg cubicTo(double aCPX0, double aCPY0, double aCPX1, double aCPY1, double aX, double aY, double[] coords) Returns a CubicTo for given coords. -
arcTo
protected final Seg arcTo(double lx, double ly, double cx, double cy, double x, double y, double[] coords) Returns a CubicTo for start, corner and end points. -
close
Returns a close. -
getBounds
Returns bounds rect for given PathIter. -
getArcLength
Returns total length of segments for given PathIter. -
getPathIterForPathIterArray
Returns a combined PathIter for given array of PathIter.
-