public class Subpath extends Object implements Serializable
| Constructor and Description |
|---|
Subpath()
Creates a new SubPath instance.
|
Subpath(float startPointX,
float startPointY)
Constructs a new subpath starting at the given point.
|
Subpath(Point startPoint)
Constructs a new subpath starting at the given point.
|
Subpath(Subpath subpath)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSegment(IShape segment)
Adds a segment to the subpath.
|
Point |
getLastPoint() |
List<Point> |
getPiecewiseLinearApproximation() |
List<IShape> |
getSegments() |
Point |
getStartPoint() |
boolean |
isClosed()
Returns a
boolean value indicating whether the subpath must be closed or not. |
boolean |
isDegenerate()
Returns a
boolean indicating whether the subpath is degenerate or not. |
boolean |
isEmpty()
Checks whether subpath is empty or not.
|
boolean |
isSinglePointClosed() |
boolean |
isSinglePointOpen() |
void |
setClosed(boolean closed)
See
isClosed() |
void |
setStartPoint(float x,
float y)
Sets the start point of the subpath.
|
void |
setStartPoint(Point startPoint)
Sets the start point of the subpath.
|
public Subpath()
public Subpath(Subpath subpath)
public Subpath(Point startPoint)
startPoint - the point this subpath starts atpublic Subpath(float startPointX,
float startPointY)
startPointX - x-coordinate of the start point of subpathstartPointY - y-coordinate of the start point of subpathpublic void setStartPoint(Point startPoint)
startPoint - the point this subpath starts atpublic void setStartPoint(float x,
float y)
x - x-coordinate of the start pinty - y-coordinate of the start pintpublic Point getStartPoint()
public Point getLastPoint()
public void addSegment(IShape segment)
segment - new segment.public List<IShape> getSegments()
List comprising all the segments
the subpath made on.public boolean isEmpty()
public boolean isSinglePointOpen()
true if this subpath contains only one point and it is not closed,
false otherwisepublic boolean isSinglePointClosed()
true if this subpath contains only one point and it is closed,
false otherwisepublic boolean isClosed()
boolean value indicating whether the subpath must be closed or not.
Ignore this value if the subpath is a rectangle because in this case it is already closed
(of course if you paint the path using re operator)boolean value indicating whether the path must be closed or not.public void setClosed(boolean closed)
isClosed()closed - boolean value indicating whether the path is closed or not.public boolean isDegenerate()
boolean indicating whether the subpath is degenerate or not.
A degenerate subpath is the subpath consisting of a single-point closed path or of
two or more points at the same coordinates.boolean value indicating whether the path is degenerate or not.Copyright © 1998–2021 iText Group NV. All rights reserved.