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.Segments.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intACLOSEPath.Segmentrepresents the link from the current position of aPathto the position of the lastMOVE_TOPath.Segment.static final intACUBIC_TOPath.Segmentrepresents aCubicCurvefrom the previous position of aPathto thePointat index 2 associated with thePath.Segment.static final intALINE_TOPath.Segmentrepresents aLinefrom the previous position of aPathto thePointat index 0 associated with thePath.Segment.static final intAMOVE_TOPath.Segmentrepresents a change of position while piecewise building aPath, without inserting a new curve.static final intAQUAD_TOPath.Segmentrepresents aQuadraticCurvefrom the previous position of aPathto thePointat index 1 associated with thePath.Segment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCopy()Returns a copy of thisPath.Segment.Point[]Returns a copy of thePoints associated with thisPath.Segment.intgetType()Returns the type of thisPath.Segment.inthashCode()
-
Field Details
-
MOVE_TO
public static final int MOVE_TOAMOVE_TOPath.Segmentrepresents a change of position while piecewise building aPath, without inserting a new curve. -
LINE_TO
public static final int LINE_TOALINE_TOPath.Segmentrepresents aLinefrom the previous position of aPathto thePointat index 0 associated with thePath.Segment. -
QUAD_TO
public static final int QUAD_TOAQUAD_TOPath.Segmentrepresents aQuadraticCurvefrom the previous position of aPathto thePointat index 1 associated with thePath.Segment. ThePointat index 0 is used as the handlePointof theQuadraticCurve. -
CUBIC_TO
public static final int CUBIC_TOACUBIC_TOPath.Segmentrepresents aCubicCurvefrom the previous position of aPathto thePointat index 2 associated with thePath.Segment. ThePoints at indices 0 and 1 are used as the handlePoints of theCubicCurve. -
CLOSE
public static final int CLOSEACLOSEPath.Segmentrepresents the link from the current position of aPathto the position of the lastMOVE_TOPath.Segment.- See Also:
-
-
Constructor Details
-
Segment
Constructs a newPath.Segmentof the given type. The passed-inPoints are associated with thisPath.Segment.- Parameters:
type- The type of the newPath.Segment. It is one ofpoints- thePoints to associate with thisPath.Segment
-
-
Method Details
-
equals
-
getCopy
Returns a copy of thisPath.Segment. The associatedPoints are copied, too.- Returns:
- a copy of this
Path.Segment
-
getPoints
Returns a copy of thePoints associated with thisPath.Segment.- Returns:
- a copy of the
Points 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()
-