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 intCLOSEACLOSEPath.Segmentrepresents the link from the current position of aPathto the position of the lastMOVE_TOPath.Segment.static intCUBIC_TOACUBIC_TOPath.Segmentrepresents aCubicCurvefrom the previous position of aPathto thePointat index 2 associated with thePath.Segment.static intLINE_TOALINE_TOPath.Segmentrepresents aLinefrom the previous position of aPathto thePointat index 0 associated with thePath.Segment.static intMOVE_TOAMOVE_TOPath.Segmentrepresents a change of position while piecewise building aPath, without inserting a new curve.static intQUAD_TOAQUAD_TOPath.Segmentrepresents aQuadraticCurvefrom the previous position of aPathto thePointat index 1 associated with thePath.Segment.
-
Constructor Summary
Constructors Constructor Description Segment(int type, Point... points)Constructs a newPath.Segmentof the given type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Path.SegmentgetCopy()Returns a copy of thisPath.Segment.Point[]getPoints()Returns a copy of thePoints associated with thisPath.Segment.intgetType()Returns the type of thisPath.Segment.inthashCode()
-
-
-
Field Detail
-
MOVE_TO
public static final int MOVE_TO
AMOVE_TOPath.Segmentrepresents 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_TOPath.Segmentrepresents aLinefrom the previous position of aPathto thePointat index 0 associated with thePath.Segment.- See Also:
Path.lineTo(double, double), Constant Field Values
-
QUAD_TO
public static final int QUAD_TO
AQUAD_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_TO
ACUBIC_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 CLOSE
ACLOSEPath.Segmentrepresents the link from the current position of aPathto the position of the lastMOVE_TOPath.Segment.- See Also:
Path.close(), Constant Field Values
-
-
Constructor Detail
-
Segment
public Segment(int type, Point... points)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 Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getCopy
public Path.Segment getCopy()
Returns a copy of thisPath.Segment. The associatedPoints are copied, too.- Returns:
- a copy of this
Path.Segment
-
getPoints
public Point[] 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:
MOVE_TO,LINE_TO,QUAD_TO,CUBIC_TO
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-