public class Polyline extends PointList implements Path2d
Path2d implicitly made up of Line2d segments
based on the assumption of ordered points held in a PointList.| Constructor and Description |
|---|
Polyline(Iterator<Line2d> lineIterator)
Construct a
Polyline from line segments |
Polyline(List<? extends Point2d> points)
Construct a
Polyline from points |
Polyline(List<? extends Point2d> points,
boolean copy)
Construct a
Polyline from the points, possibly copying the points
first |
Polyline(Point2d... points)
Construct a
Polyline from points |
| Modifier and Type | Method and Description |
|---|---|
Polyline |
asPolyline()
Convert the path to a polyline representation
|
Point2d |
begin()
Get the beginning of the path
|
double |
calculateLength()
Calculate the length of the path
|
Point2d |
end()
Get the end of the path
|
Iterator<Line2d> |
lineIterator()
Convert the path to a iterated polyline representation
|
calculateCentroid, calculateConvexHull, calculateRegularBoundingBox, clone, computeIntrinsicScale, computeMean, get, getHeight, getLines, getLines, getWidth, iterator, maxX, maxY, minX, minY, rotate, rotate, scale, scale, scaleCentroid, scaleX, scaleXY, scaleY, size, toString, transform, translateequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcalculateCentroid, calculateRegularBoundingBox, getHeight, getWidth, maxX, maxY, minX, minY, scale, scale, scaleCentroid, transform, translateforEach, spliteratorpublic Polyline(Point2d... points)
Polyline from pointspoints - the pointspublic Polyline(List<? extends Point2d> points)
Polyline from pointspoints - the pointspublic Polyline(List<? extends Point2d> points, boolean copy)
Polyline from the points, possibly copying the points
firstpoints - the pointscopy - should the points be copiedpublic Point2d begin()
Path2dpublic Polyline asPolyline()
Path2dasPolyline in interface Path2dpublic Iterator<Line2d> lineIterator()
Path2dlineIterator in interface Path2dpublic double calculateLength()
Path2dcalculateLength in interface Path2d