Package org.eclipse.gef.geometry.planar
Class Path.Segment
java.lang.Object
org.eclipse.gef.geometry.planar.Path.Segment
- Enclosing class:
- Path
Representation for different types of
Path.Segment
s.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ACLOSE
Path.Segment
represents the link from the current position of aPath
to the position of the lastMOVE_TO
Path.Segment
.static final int
ACUBIC_TO
Path.Segment
represents aCubicCurve
from the previous position of aPath
to thePoint
at index 2 associated with thePath.Segment
.static final int
ALINE_TO
Path.Segment
represents aLine
from the previous position of aPath
to thePoint
at index 0 associated with thePath.Segment
.static final int
AMOVE_TO
Path.Segment
represents a change of position while piecewise building aPath
, without inserting a new curve.static final int
AQUAD_TO
Path.Segment
represents aQuadraticCurve
from the previous position of aPath
to thePoint
at index 1 associated with thePath.Segment
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getCopy()
Returns a copy of thisPath.Segment
.Point[]
Returns a copy of thePoint
s associated with thisPath.Segment
.int
getType()
Returns the type of thisPath.Segment
.int
hashCode()
-
Field Details
-
MOVE_TO
public static final int MOVE_TOAMOVE_TO
Path.Segment
represents a change of position while piecewise building aPath
, without inserting a new curve. -
LINE_TO
public static final int LINE_TOALINE_TO
Path.Segment
represents aLine
from the previous position of aPath
to thePoint
at index 0 associated with thePath.Segment
. -
QUAD_TO
public static final int QUAD_TOAQUAD_TO
Path.Segment
represents aQuadraticCurve
from the previous position of aPath
to thePoint
at index 1 associated with thePath.Segment
. ThePoint
at index 0 is used as the handlePoint
of theQuadraticCurve
. -
CUBIC_TO
public static final int CUBIC_TOACUBIC_TO
Path.Segment
represents aCubicCurve
from the previous position of aPath
to thePoint
at index 2 associated with thePath.Segment
. ThePoint
s at indices 0 and 1 are used as the handlePoint
s of theCubicCurve
. -
CLOSE
public static final int CLOSEACLOSE
Path.Segment
represents the link from the current position of aPath
to the position of the lastMOVE_TO
Path.Segment
.- See Also:
-
-
Constructor Details
-
Segment
Constructs a newPath.Segment
of the given type. The passed-inPoint
s are associated with thisPath.Segment
.- Parameters:
type
- The type of the newPath.Segment
. It is one ofpoints
- thePoint
s to associate with thisPath.Segment
-
-
Method Details
-
equals
-
getCopy
Returns a copy of thisPath.Segment
. The associatedPoint
s are copied, too.- Returns:
- a copy of this
Path.Segment
-
getPoints
Returns a copy of thePoint
s associated with thisPath.Segment
.- Returns:
- a copy of the
Point
s associated with thisPath.Segment
.
-
getType
public int getType()Returns the type of thisPath.Segment
.- Returns:
- the type of this
Path.Segment
- See Also:
-
hashCode
public int hashCode()
-