| Modifier and Type | Field and Description |
|---|---|
static int |
CLOSE
A
CLOSE Path.Segment represents the link from the current
position of a Path to the position of the last
MOVE_TO Path.Segment. |
static int |
CUBIC_TO
A
CUBIC_TO Path.Segment represents a CubicCurve
from the previous position of a Path to the Point at
index 2 associated with the Path.Segment. |
static int |
LINE_TO
A
LINE_TO Path.Segment represents a Line from the
previous position of a Path to the Point at index 0
associated with the Path.Segment. |
static int |
MOVE_TO
A
MOVE_TO Path.Segment represents a change of position
while piecewise building a Path, without inserting a new
curve. |
static int |
QUAD_TO
A
QUAD_TO Path.Segment represents a
QuadraticCurve from the previous position of a Path
to the Point at index 1 associated with the Path.Segment. |
| Constructor and Description |
|---|
Segment(int type,
Point... points)
Constructs a new
Path.Segment of the given type. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
Path.Segment |
getCopy()
Returns a copy of this
Path.Segment. |
Point[] |
getPoints()
Returns a copy of the
Points associated with this
Path.Segment. |
int |
getType()
Returns the type of this
Path.Segment. |
int |
hashCode() |
public static final int MOVE_TO
MOVE_TO Path.Segment represents a change of position
while piecewise building a Path, without inserting a new
curve.Path.moveTo(double, double),
Constant Field Valuespublic static final int LINE_TO
LINE_TO Path.Segment represents a Line from the
previous position of a Path to the Point at index 0
associated with the Path.Segment.Path.lineTo(double, double),
Constant Field Valuespublic static final int QUAD_TO
QUAD_TO Path.Segment represents a
QuadraticCurve from the previous position of a Path
to the Point at index 1 associated with the Path.Segment.
The Point at index 0 is used as the handle Point of
the QuadraticCurve.public static final int CUBIC_TO
CUBIC_TO Path.Segment represents a CubicCurve
from the previous position of a Path to the Point at
index 2 associated with the Path.Segment. The Points at
indices 0 and 1 are used as the handle Points of the
CubicCurve.public static final int CLOSE
CLOSE Path.Segment represents the link from the current
position of a Path to the position of the last
MOVE_TO Path.Segment.Path.close(),
Constant Field Valuespublic Segment(int type,
Point... points)
Path.Segment of the given type. The passed-in
Points are associated with this Path.Segment.type - The type of the new Path.Segment. It is one of
points - the Points to associate with this Path.Segmentpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic Path.Segment getCopy()
Path.Segment. The associated Points
are copied, too.Path.Segmentpublic Point[] getPoints()
Points associated with this
Path.Segment.Points associated with this
Path.Segment.public int getType()
Path.Segment.Path.SegmentMOVE_TO,
LINE_TO,
QUAD_TO,
CUBIC_TOpublic int hashCode()
hashCode in class java.lang.ObjectCopyright (c) 2014 itemis AG, and others. All rights reserved.