java.lang.Object
org.bzdev.geom.Path2DInfo.Entry
- Enclosing class:
- Path2DInfo
Class defining a list entry describing a path segment.
The list is returned by calling
getEntries
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Get the coordinate array for the segment.getData()
Get the segment data associated with this segment.getEnd()
Get the ending point for the segment.int
getIndex()
Get an index indicating the segment's position along a path.double
Get the length of a segment.Get a function that will compute the length of a subsegment from the start of of the segment to a point specified by the segment's path parameter.getStart()
Get the starting point for the segmentint
getType()
Get the type of the segmentGet the type of the segment, formatted as a string
-
Method Details
-
getIndex
public int getIndex()Get an index indicating the segment's position along a path.- Returns:
- the index
-
getStart
Get the starting point for the segment- Returns:
- the starting point for the segment
-
getEnd
Get the ending point for the segment.- Returns:
- the ending point
-
getSegmentLength
public double getSegmentLength()Get the length of a segment.- Returns:
- the length of the segment
-
getSegmentLengthFunction
Get a function that will compute the length of a subsegment from the start of of the segment to a point specified by the segment's path parameter.In some unsual cases, a function is not available due to numerical accuracy issues, in which case numerical integration may be used.
- Returns:
- a function that computes the subsegment length given a path parameter provided as the function's argument; null if a function is not available.
-
getCoords
public double[] getCoords()Get the coordinate array for the segment. This will include intermediate control points and the end point but not the starting point of the segment. The coordinate array that is returned must not be modified.- Returns:
- the coordinate array for the segment
-
getData
Get the segment data associated with this segment.- Returns:
- the segment data for this entry
-
getType
public int getType()Get the type of the segment- Returns:
- the segment type (PathIterator.SEG_MOVETO, PathIterator.SEG_LINETO, PathIterator.SEG_QUADTO, PathIterator.SEG_CUBICTO and PathIterator.SEG_CLOSE)
-
getTypeString
Get the type of the segment, formatted as a string- Returns:
- a string describing the segment type
-