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 constuctor.
|
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)
subpath
-
public Subpath(Point startPoint)
public Subpath(float startPointX, float startPointY)
public void setStartPoint(Point startPoint)
startPoint
-
public void setStartPoint(float x, float y)
x
-
y
-
public 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
otherwise
public boolean isSinglePointClosed()
true
if this subpath contains only one point and it is closed, false
otherwise
public 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()
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–2020 iText Group NV. All rights reserved.