Package org.eclipse.gef.geometry.planar
Class Path.Segment
- java.lang.Object
-
- org.eclipse.gef.geometry.planar.Path.Segment
-
-
Field Summary
Fields Modifier and Type Field Description static int
CLOSE
ACLOSE
Path.Segment
represents the link from the current position of aPath
to the position of the lastMOVE_TO
Path.Segment
.static int
CUBIC_TO
ACUBIC_TO
Path.Segment
represents aCubicCurve
from the previous position of aPath
to thePoint
at index 2 associated with thePath.Segment
.static int
LINE_TO
ALINE_TO
Path.Segment
represents aLine
from the previous position of aPath
to thePoint
at index 0 associated with thePath.Segment
.static int
MOVE_TO
AMOVE_TO
Path.Segment
represents a change of position while piecewise building aPath
, without inserting a new curve.static int
QUAD_TO
AQUAD_TO
Path.Segment
represents aQuadraticCurve
from the previous position of aPath
to thePoint
at index 1 associated with thePath.Segment
.
-
Constructor Summary
Constructors Constructor Description Segment(int type, Point... points)
Constructs a newPath.Segment
of the given type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Path.Segment
getCopy()
Returns a copy of thisPath.Segment
.Point[]
getPoints()
Returns a copy of thePoint
s associated with thisPath.Segment
.int
getType()
Returns the type of thisPath.Segment
.int
hashCode()
-
-
-
Field Detail
-
MOVE_TO
public static final int MOVE_TO
AMOVE_TO
Path.Segment
represents a change of position while piecewise building aPath
, without inserting a new curve.- See Also:
Path.moveTo(double, double)
, Constant Field Values
-
LINE_TO
public static final int LINE_TO
ALINE_TO
Path.Segment
represents aLine
from the previous position of aPath
to thePoint
at index 0 associated with thePath.Segment
.- See Also:
Path.lineTo(double, double)
, Constant Field Values
-
QUAD_TO
public static final int QUAD_TO
AQUAD_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_TO
ACUBIC_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 CLOSE
ACLOSE
Path.Segment
represents the link from the current position of aPath
to the position of the lastMOVE_TO
Path.Segment
.- See Also:
Path.close()
, Constant Field Values
-
-
Constructor Detail
-
Segment
public Segment(int type, Point... points)
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 Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getCopy
public Path.Segment getCopy()
Returns a copy of thisPath.Segment
. The associatedPoint
s are copied, too.- Returns:
- a copy of this
Path.Segment
-
getPoints
public Point[] 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:
MOVE_TO
,LINE_TO
,QUAD_TO
,CUBIC_TO
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-