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
Point s 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 Point
s at
indices 0 and 1 are used as the handle Point
s 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
Point
s are associated with this Path.Segment
.type
- The type of the new Path.Segment
. It is one of
points
- the Point
s to associate with this Path.Segment
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Path.Segment getCopy()
Path.Segment
. The associated Point
s
are copied, too.Path.Segment
public Point[] getPoints()
Point
s associated with this
Path.Segment
.Point
s associated with this
Path.Segment
.public int getType()
Path.Segment
.Path.Segment
MOVE_TO
,
LINE_TO
,
QUAD_TO
,
CUBIC_TO
public int hashCode()
hashCode
in class java.lang.Object
Copyright (c) 2014 itemis AG, and others. All rights reserved.