GraphicsPathIterator

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.IDisposable

public final class GraphicsPathIterator implements System.IDisposable

Provides the ability to iterate through subpaths in a GraphicsPath and test the types of shapes contained in each subpath. This class cannot be inherited.

Constructors

ConstructorDescription
GraphicsPathIterator(GraphicsPath path)Initializes a new instance of the GraphicsPathIterator class.

Methods

MethodDescription
getCount()Gets the number of points in the path.
getSubpathCount()Gets the number of subpaths in the path.
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
copyData(PointF[][] points, byte[][] types, int startIndex, int endIndex)Copies the GraphicsPath.PathPoints property and GraphicsPath.PathTypes property arrays of the associated GraphicsPath into the two specified arrays.
enumerate(PointF[][] points, byte[][] types)Copies the GraphicsPath.PathPoints property and GraphicsPath.PathTypes property arrays of the associated GraphicsPath into the two specified arrays.
hasCurve()Indicates whether the path associated with this GraphicsPathIterator contains a curve.
nextMarker(int[] startIndex, int[] endIndex)Increments the GraphicsPathIterator to the next marker in the path and returns the start and stop indexes by way of the [out] parameters.
nextMarker(GraphicsPath path)This GraphicsPathIterator object has a GraphicsPath object associated with it.
nextPathType(byte[] pathType, int[] startIndex, int[] endIndex)Gets the starting index and the ending index of the next group of data points that all have the same type.
nextSubpath(int[] startIndex, int[] endIndex, boolean[] isClosed)Moves the GraphicsPathIterator to the next subpath in the path.
nextSubpath(GraphicsPath path, boolean[] isClosed)Gets the next figure (subpath) from the associated path of this GraphicsPathIterator.
rewind()Rewinds this GraphicsPathIterator to the beginning of its associated path.

GraphicsPathIterator(GraphicsPath path)

public GraphicsPathIterator(GraphicsPath path)

Initializes a new instance of the GraphicsPathIterator class.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath object for which this helper class is to be initialized.

getCount()

public int getCount()

Gets the number of points in the path.

Returns: int - the number of points in the path.

getSubpathCount()

public int getSubpathCount()

Gets the number of subpaths in the path.

Returns: int - the number of subpaths in the path.

dispose()

public void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

copyData(PointF[][] points, byte[][] types, int startIndex, int endIndex)

public int copyData(PointF[][] points, byte[][] types, int startIndex, int endIndex)

Copies the GraphicsPath.PathPoints property and GraphicsPath.PathTypes property arrays of the associated GraphicsPath into the two specified arrays.

Parameters:

ParameterTypeDescription
pointsPointF[]Upon return, contains an array of System.Drawing.PointF structures that represents the points in the path.
typesbyte[][]Upon return, contains an array of bytes that represents the types of points in the path.
startIndexintSpecifies the starting index of the arrays.
endIndexintSpecifies the ending index of the arrays.

Returns: int - The number of points copied.

enumerate(PointF[][] points, byte[][] types)

public int enumerate(PointF[][] points, byte[][] types)

Copies the GraphicsPath.PathPoints property and GraphicsPath.PathTypes property arrays of the associated GraphicsPath into the two specified arrays.

Parameters:

ParameterTypeDescription
pointsPointF[]Upon return, contains an array of System.Drawing.PointF structures that represents the points in the path.
typesbyte[][]Upon return, contains an array of bytes that represents the types of points in the path.

Returns: int - The number of points copied.

hasCurve()

public boolean hasCurve()

Indicates whether the path associated with this GraphicsPathIterator contains a curve.

Returns: boolean - This method returns true if the current subpath contains a curve; otherwise, false.

nextMarker(int[] startIndex, int[] endIndex)

public int nextMarker(int[] startIndex, int[] endIndex)

Increments the GraphicsPathIterator to the next marker in the path and returns the start and stop indexes by way of the [out] parameters.

Parameters:

ParameterTypeDescription
startIndexint[][out] The integer reference supplied to this parameter receives the index of the point that starts a subpath.
endIndexint[][out] The integer reference supplied to this parameter receives the index of the point that ends the subpath to which startIndex points.

Returns: int - The number of points between this marker and the next.

nextMarker(GraphicsPath path)

public int nextMarker(GraphicsPath path)

This GraphicsPathIterator object has a GraphicsPath object associated with it. This method increments the associated GraphicsPath to the next marker in its path and copies all the points contained between the current marker and the next marker (or end of path) to a second GraphicsPath object passed in to the parameter.

Parameters:

ParameterTypeDescription
pathGraphicsPathThe GraphicsPath object to which the points will be copied.

Returns: int - The number of points between this marker and the next.

nextPathType(byte[] pathType, int[] startIndex, int[] endIndex)

public int nextPathType(byte[] pathType, int[] startIndex, int[] endIndex)

Gets the starting index and the ending index of the next group of data points that all have the same type.

Parameters:

ParameterTypeDescription
pathTypebyte[][out] Receives the point type shared by all points in the group. Possible types can be retrieved from the PathPointType enumeration.
startIndexint[][out] Receives the starting index of the group of points.
endIndexint[][out] Receives the ending index of the group of points.

Returns: int - This method returns the number of data points in the group. If there are no more groups in the path, this method returns 0.

nextSubpath(int[] startIndex, int[] endIndex, boolean[] isClosed)

public int nextSubpath(int[] startIndex, int[] endIndex, boolean[] isClosed)

Moves the GraphicsPathIterator to the next subpath in the path. The start index and end index of the next subpath are contained in the [out] parameters.

Parameters:

ParameterTypeDescription
startIndexint[][out] Receives the starting index of the next subpath.
endIndexint[][out] Receives the ending index of the next subpath.
isClosedboolean[][out] Indicates whether the subpath is closed.

Returns: int - The number of data points in the retrieved figure (subpath). If there are no more figures to retrieve, zero is returned.

nextSubpath(GraphicsPath path, boolean[] isClosed)

public int nextSubpath(GraphicsPath path, boolean[] isClosed)

Gets the next figure (subpath) from the associated path of this GraphicsPathIterator.

Parameters:

ParameterTypeDescription
pathGraphicsPathA GraphicsPath that is to have its data points set to match the data points of the retrieved figure (subpath) for this iterator.
isClosedboolean[][out] Indicates whether the current subpath is closed. It is true if the if the figure is closed, otherwise it is false.

Returns: int - The number of data points in the retrieved figure (subpath). If there are no more figures to retrieve, zero is returned.

rewind()

public void rewind()

Rewinds this GraphicsPathIterator to the beginning of its associated path.