- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx<Path2ifx>
-
- org.arakhne.afc.math.geometry.d2.ifx.Path2ifx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Path2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ifx<Path2ifx>
,Path2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
,JsonableObject
public class Path2ifx extends AbstractShape2ifx<Path2ifx> implements Path2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
Path with 2 integer FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.ai.Path2ai
Path2ai.AbstractPathIterator<E extends PathElement2ai>, Path2ai.FlatteningPathIterator<E extends PathElement2ai>, Path2ai.PathPathIterator<E extends PathElement2ai>, Path2ai.PixelIterator<P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>, Path2ai.PrivateAPI, Path2ai.TransformedPathIterator<E extends PathElement2ai>
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.Path2D
Path2D.ArcType
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
boundingBox
-
Fields inherited from interface org.arakhne.afc.math.geometry.d2.ai.Path2ai
DEFAULT_FLATTENING_LIMIT, DEFAULT_WINDING_RULE, GROW_SIZE
-
-
Constructor Summary
Constructors Constructor Description Path2ifx()
Construct an empty path.Path2ifx(Iterator<PathElement2ifx> iterator)
Construct a path by copying the given elements.Path2ifx(Path2ai<?,?,?,?,?,?> path)
Constructor by copy.Path2ifx(PathWindingRule windingRule)
Construct an empty path with the given path winding rule.Path2ifx(PathWindingRule windingRule, Iterator<PathElement2ifx> iterator)
Construct a path by copying the given elements, and the given path winding rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ObjectProperty<Rectangle2ifx>
boundingBoxProperty()
Replies the property that contains the bounding box for this shape.void
clear()
Reset this shape to be equivalent to an just-created instance of this shape type.Path2ifx
clone()
Clone this shape.void
closePath()
Closes the current subpath by drawing a straight line back to the coordinates of the lastmoveTo
.boolean
containsControlPoint(Point2D<?,?> pt)
Replies if the given points exists in the coordinates of this path.javafx.beans.property.ObjectProperty<Rectangle2ifx>
controlPointBoundingBoxProperty()
Replies the property that corresponds to the bounding box of the control points.javafx.beans.property.ReadOnlyListProperty<Point2ifx>
coordinatesProperty()
Replies the coordinates property.void
curveTo(int x1, int y1, int x2, int y2, int x3, int y3)
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3, y3)
, using the specified points(x1, y1)
and(x2, y2)
as Bézier control points.void
curveTo(Point2D<?,?> ctrl1, Point2D<?,?> ctrl2, Point2D<?,?> to)
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3, y3)
, using the specified points(x1, y1)
and(x2, y2)
as Bézier control points.int
getCoordAt(int index)
Replies the coordinate at the given index.Point2ifx
getCurrentPoint()
Replies the last point in the path.int
getCurrentX()
Replies the x coordinate of the last point in the path.int
getCurrentY()
Replies the x coordinate of the last point in the path.int
getPathElementCount()
Replies the number of path elements in this path.PathElementType
getPathElementTypeAt(int index)
Replies the type of the path element at the given position in this path.Point2ifx
getPointAt(int index)
Replies the point at the given index.PathWindingRule
getWindingRule()
Replies the winding rule for the path.int
hashCode()
protected javafx.beans.property.ReadOnlyListWrapper<Point2ifx>
innerPointsProperty()
Replies the private coordinates property.protected javafx.beans.property.ReadOnlyListWrapper<PathElementType>
innerTypesProperty()
Replies the private types property.boolean
isCurved()
Replies the path contains a curve..javafx.beans.property.BooleanProperty
isCurvedProperty()
Replies the isCurved property.boolean
isEmpty()
Replies if this shape is empty.javafx.beans.property.BooleanProperty
isEmptyProperty()
Replies the isEmpty property.boolean
isMultiParts()
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside.javafx.beans.property.BooleanProperty
isMultiPartsProperty()
Replies the isMultiParts property.boolean
isPolygon()
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
, orARC_TO
, and a singleCLOSE
primitives.javafx.beans.property.BooleanProperty
isPolygonProperty()
Replies the isPolygon property.boolean
isPolyline()
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.javafx.beans.property.BooleanProperty
isPolylineProperty()
Replies the isPolyline property.void
lineTo(int x, int y)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.void
lineTo(Point2D<?,?> to)
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.void
moveTo(int x, int y)
Adds a point to the path by moving to the specified coordinates specified in double precision.void
moveTo(Point2D<?,?> position)
Adds a point to the path by moving to the specified coordinates specified in double precision.void
quadTo(int x1, int y1, int x2, int y2)
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2, y2)
, using the specified point(x1, y1)
as a quadratic parametric control point.void
quadTo(Point2D<?,?> ctrl, Point2D<?,?> to)
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2, y2)
, using the specified point(x1, y1)
as a quadratic parametric control point.boolean
remove(int x, int y)
Remove the point with the given coordinates.boolean
remove(Point2D<?,?> point)
Remove the point from this path.void
removeLast()
Remove the last action.void
set(Path2ifx path)
Set this shape with the attributes of the given shape.void
setLastPoint(int x, int y)
Change the coordinates of the last inserted point.void
setLastPoint(Point2D<?,?> point)
Change the coordinates of the last inserted point.void
setWindingRule(PathWindingRule rule)
Set the winding rule for the path.int
size()
Replies the number of points in the path.Rectangle2ifx
toBoundingBox()
Replies the bounding box of this shape.void
toBoundingBox(Rectangle2ifx box)
Replies the bounds of the shape.Rectangle2ifx
toBoundingBoxWithCtrlPoints()
Replies the bounding box of all the points added in this path.void
toBoundingBoxWithCtrlPoints(Rectangle2ifx box)
Compute the bounding box of all the points added in this path.double[]
toDoubleArray(Transform2D transform)
Replies the coordinates of this path in an array of double precision floating-point numbers.float[]
toFloatArray(Transform2D transform)
Replies the coordinates of this path in an array of single precision floating-point numbers.int[]
toIntArray(Transform2D transform)
Replies the coordinates of this path in an array of integer numbers.Point2ifx[]
toPointArray(Transform2D transform)
Replies the points of this path in an array.void
transform(Transform2D transform)
Transform the current path.void
translate(int dx, int dy)
Translate the shape.javafx.beans.property.ReadOnlyListProperty<PathElementType>
typesProperty()
Replies the types property.javafx.beans.property.ObjectProperty<PathWindingRule>
windingRuleProperty()
Replies the windingRule property.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
equals, getGeomFactory, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Path2ai
add, arcTo, arcTo, arcTo, arcTo, arcTo, contains, contains, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getFlatteningPathIterator, getLengthSquared, getPathIterator, getPathIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, moveToIfFar, moveToIfFar, set, toCollection
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Path2D
arcTo, getLength, toDoubleArray, toFloatArray, toIntArray, toPointArray
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Shape2ai
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
Path2ifx
public Path2ifx()
Construct an empty path.
-
Path2ifx
public Path2ifx(Iterator<PathElement2ifx> iterator)
Construct a path by copying the given elements.- Parameters:
iterator
- the iterator that provides the elements to copy.
-
Path2ifx
public Path2ifx(PathWindingRule windingRule)
Construct an empty path with the given path winding rule.- Parameters:
windingRule
- the path winding rule.
-
Path2ifx
public Path2ifx(PathWindingRule windingRule, Iterator<PathElement2ifx> iterator)
Construct a path by copying the given elements, and the given path winding rule.- Parameters:
windingRule
- the path winding rule.iterator
- the iterator that provides the elements to copy.
-
Path2ifx
public Path2ifx(Path2ai<?,?,?,?,?,?> path)
Constructor by copy.- Parameters:
path
- the path to copy.
-
-
Method Detail
-
containsControlPoint
@Pure public boolean containsControlPoint(Point2D<?,?> pt)
Description copied from interface:Path2D
Replies if the given points exists in the coordinates of this path.- Specified by:
containsControlPoint
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
pt
- the point.- Returns:
true
if the point is a control point of the path.
-
clear
public void clear()
Description copied from interface:Shape2D
Reset this shape to be equivalent to an just-created instance of this shape type.- Specified by:
clear
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
-
clone
@Pure public Path2ifx clone()
Description copied from interface:Shape2D
Clone this shape.- Specified by:
clone
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Overrides:
clone
in classAbstractShape2ifx<Path2ifx>
- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape2ifx<Path2ifx>
-
translate
public void translate(int dx, int dy)
Description copied from interface:Shape2ai
Translate the shape.- Specified by:
translate
in interfaceShape2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
dx
- x translation.dy
- y translation.
-
transform
public void transform(Transform2D transform)
Description copied from interface:Path2ai
Transform the current path. This function changes the current path.- Specified by:
transform
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
transform
- is the affine transformation to apply.- See Also:
Shape2ai.createTransformedShape(org.arakhne.afc.math.geometry.d2.Transform2D)
-
isEmptyProperty
public javafx.beans.property.BooleanProperty isEmptyProperty()
Replies the isEmpty property.- Returns:
- the isEmpty property.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Shape2D
Replies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmpty
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
true
if the shape is empty;false
otherwise.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<Rectangle2ifx> boundingBoxProperty()
Description copied from interface:Shape2ifx
Replies the property that contains the bounding box for this shape.- Specified by:
boundingBoxProperty
in interfaceShape2ifx<Path2ifx>
- Returns:
- the bounding box.
-
controlPointBoundingBoxProperty
public javafx.beans.property.ObjectProperty<Rectangle2ifx> controlPointBoundingBoxProperty()
Replies the property that corresponds to the bounding box of the control points.The replied box is not the one corresponding to the drawable elements, as replied by
boundingBoxProperty()
.- Returns:
- the bounding box of the control points.
-
toBoundingBox
public Rectangle2ifx toBoundingBox()
Description copied from interface:Shape2D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
toBoundingBox
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the bounding box of this shape.
-
toBoundingBox
public void toBoundingBox(Rectangle2ifx box)
Description copied from interface:Shape2D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
box
- is set with the bounds of the shape.
-
windingRuleProperty
public javafx.beans.property.ObjectProperty<PathWindingRule> windingRuleProperty()
Replies the windingRule property.- Returns:
- the windingRule property.
-
getWindingRule
public PathWindingRule getWindingRule()
Description copied from interface:Path2D
Replies the winding rule for the path.- Specified by:
getWindingRule
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the winding rule for the path.
-
setWindingRule
public void setWindingRule(PathWindingRule rule)
Description copied from interface:Path2D
Set the winding rule for the path.- Specified by:
setWindingRule
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
rule
- is the winding rule for the path.
-
isPolylineProperty
public javafx.beans.property.BooleanProperty isPolylineProperty()
Replies the isPolyline property.- Returns:
- the isPolyline property.
-
isPolyline
public boolean isPolyline()
Description copied from interface:Path2D
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.- Specified by:
isPolyline
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
isCurvedProperty
public javafx.beans.property.BooleanProperty isCurvedProperty()
Replies the isCurved property.- Returns:
- the isCurved property.
-
isCurved
public boolean isCurved()
Description copied from interface:Path2D
Replies the path contains a curve..- Specified by:
isCurved
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
isMultiPartsProperty
public javafx.beans.property.BooleanProperty isMultiPartsProperty()
Replies the isMultiParts property.- Returns:
- the isMultiParts property.
-
isMultiParts
public boolean isMultiParts()
Description copied from interface:Path2D
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside. primitives.- Specified by:
isMultiParts
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
true
if the path has multiple move-to primitive,false
otherwise.
-
isPolygonProperty
public javafx.beans.property.BooleanProperty isPolygonProperty()
Replies the isPolygon property.- Returns:
- the isPolygon property.
-
isPolygon
public boolean isPolygon()
Description copied from interface:Path2D
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
, orARC_TO
, and a singleCLOSE
primitives.- Specified by:
isPolygon
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
closePath
public void closePath()
Description copied from interface:Path2D
Closes the current subpath by drawing a straight line back to the coordinates of the lastmoveTo
. If the path is already closed or if the previous coordinates are for amoveTo
then this method has no effect.- Specified by:
closePath
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
-
toBoundingBoxWithCtrlPoints
public Rectangle2ifx toBoundingBoxWithCtrlPoints()
Description copied from interface:Path2D
Replies the bounding box of all the points added in this path.The replied bounding box includes the (invisible) control points.
- Specified by:
toBoundingBoxWithCtrlPoints
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the bounding box with the control points.
- See Also:
Shape2D.toBoundingBox()
-
toBoundingBoxWithCtrlPoints
public void toBoundingBoxWithCtrlPoints(Rectangle2ifx box)
Description copied from interface:Path2D
Compute the bounding box of all the points added in this path.The replied bounding box includes the (invisible) control points.
- Specified by:
toBoundingBoxWithCtrlPoints
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
box
- is the rectangle to set with the bounds.- See Also:
Shape2D.toBoundingBox()
-
toIntArray
public int[] toIntArray(Transform2D transform)
Description copied from interface:Path2D
Replies the coordinates of this path in an array of integer numbers.- Specified by:
toIntArray
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toFloatArray
public float[] toFloatArray(Transform2D transform)
Description copied from interface:Path2D
Replies the coordinates of this path in an array of single precision floating-point numbers.- Specified by:
toFloatArray
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toDoubleArray
public double[] toDoubleArray(Transform2D transform)
Description copied from interface:Path2D
Replies the coordinates of this path in an array of double precision floating-point numbers.- Specified by:
toDoubleArray
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
transform
- is the transformation to apply to all the coordinates.- Returns:
- the coordinates.
-
toPointArray
public Point2ifx[] toPointArray(Transform2D transform)
Description copied from interface:Path2D
Replies the points of this path in an array.- Specified by:
toPointArray
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
transform
- is the transformation to apply to all the points.- Returns:
- the points.
-
getPointAt
public Point2ifx getPointAt(int index)
Description copied from interface:Path2D
Replies the point at the given index. The index is in [0;Path2D.size()
).- Specified by:
getPointAt
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
index
- the index.- Returns:
- the point at the given index.
-
getCurrentX
@Pure public int getCurrentX()
Description copied from interface:Path2ai
Replies the x coordinate of the last point in the path.- Specified by:
getCurrentX
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the x coordinate of the last point in the path.
-
getCurrentY
@Pure public int getCurrentY()
Description copied from interface:Path2ai
Replies the x coordinate of the last point in the path.- Specified by:
getCurrentY
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the x coordinate of the last point in the path.
-
getCurrentPoint
@Pure public Point2ifx getCurrentPoint()
Description copied from interface:Path2D
Replies the last point in the path.- Specified by:
getCurrentPoint
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
getCurrentPoint
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the last point.
-
size
public int size()
Description copied from interface:Path2D
Replies the number of points in the path.- Specified by:
size
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the number of points in the path.
-
removeLast
public void removeLast()
Description copied from interface:Path2D
Remove the last action.- Specified by:
removeLast
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
-
moveTo
public void moveTo(int x, int y)
Description copied from interface:Path2ai
Adds a point to the path by moving to the specified coordinates specified in double precision.- Specified by:
moveTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x
- the specified X coordinatey
- the specified Y coordinate
-
moveTo
public void moveTo(Point2D<?,?> position)
Description copied from interface:Path2D
Adds a point to the path by moving to the specified coordinates specified in double precision.- Specified by:
moveTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
moveTo
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
position
- the new position.
-
lineTo
public void lineTo(int x, int y)
Description copied from interface:Path2ai
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.- Specified by:
lineTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x
- the specified X coordinatey
- the specified Y coordinate
-
lineTo
public void lineTo(Point2D<?,?> to)
Description copied from interface:Path2D
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.- Specified by:
lineTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
lineTo
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
to
- the end point
-
quadTo
public void quadTo(int x1, int y1, int x2, int y2)
Description copied from interface:Path2ai
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2, y2)
, using the specified point(x1, y1)
as a quadratic parametric control point. All coordinates are specified in double precision.- Specified by:
quadTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x1
- the X coordinate of the quadratic control pointy1
- the Y coordinate of the quadratic control pointx2
- the X coordinate of the final end pointy2
- the Y coordinate of the final end point
-
quadTo
public void quadTo(Point2D<?,?> ctrl, Point2D<?,?> to)
Description copied from interface:Path2D
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates(x2, y2)
, using the specified point(x1, y1)
as a quadratic parametric control point. All coordinates are specified in double precision.- Specified by:
quadTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
quadTo
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
ctrl
- the quadratic control pointto
- the final end point
-
curveTo
public void curveTo(int x1, int y1, int x2, int y2, int x3, int y3)
Description copied from interface:Path2ai
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3, y3)
, using the specified points(x1, y1)
and(x2, y2)
as Bézier control points. All coordinates are specified in double precision.- Specified by:
curveTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x1
- the X coordinate of the first Bézier control pointy1
- the Y coordinate of the first Bézier control pointx2
- the X coordinate of the second Bézier control pointy2
- the Y coordinate of the second Bézier control pointx3
- the X coordinate of the final end pointy3
- the Y coordinate of the final end point
-
curveTo
public void curveTo(Point2D<?,?> ctrl1, Point2D<?,?> ctrl2, Point2D<?,?> to)
Description copied from interface:Path2D
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates(x3, y3)
, using the specified points(x1, y1)
and(x2, y2)
as Bézier control points. All coordinates are specified in double precision.- Specified by:
curveTo
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
curveTo
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
ctrl1
- the first Bézier control pointctrl2
- the second Bézier control pointto
- the final end point
-
innerPointsProperty
protected javafx.beans.property.ReadOnlyListWrapper<Point2ifx> innerPointsProperty()
Replies the private coordinates property.- Returns:
- the private coordinates property.
-
coordinatesProperty
public javafx.beans.property.ReadOnlyListProperty<Point2ifx> coordinatesProperty()
Replies the coordinates property.- Returns:
- the coordinates property.
-
getCoordAt
public int getCoordAt(int index)
Description copied from interface:Path2ai
Replies the coordinate at the given index. The index is in [0;Path2D.size()
*2).- Specified by:
getCoordAt
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
index
- the index.- Returns:
- the coordinate at the given index.
-
setLastPoint
public void setLastPoint(int x, int y)
Description copied from interface:Path2ai
Change the coordinates of the last inserted point.- Specified by:
setLastPoint
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x
- the new x coordinate of the last point.y
- the new y coordinate of the last point.
-
setLastPoint
public void setLastPoint(Point2D<?,?> point)
Description copied from interface:Path2D
Change the coordinates of the last inserted point.- Specified by:
setLastPoint
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
setLastPoint
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
point
- the point.
-
remove
public boolean remove(int x, int y)
Description copied from interface:Path2ai
Remove the point with the given coordinates.If the given coordinates do not match exactly a point in the path, nothing is removed.
- Specified by:
remove
in interfacePath2ai<Shape2ifx<?>,Path2ifx,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
x
- the x coordinate of the point to remove.y
- the y coordinate of the point to remove.- Returns:
true
if the point was removed;false
otherwise.
-
remove
public boolean remove(Point2D<?,?> point)
Remove the point from this path.If the given point do not match exactly a point in the path, nothing is removed.
- Parameters:
point
- the point to remove.- Returns:
true
if the point was removed;false
otherwise.
-
set
public void set(Path2ifx path)
Description copied from interface:Shape2D
Set this shape with the attributes of the given shape.- Specified by:
set
in interfaceShape2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
path
- the shape to copy.
-
innerTypesProperty
protected javafx.beans.property.ReadOnlyListWrapper<PathElementType> innerTypesProperty()
Replies the private types property.- Returns:
- the private types property.
-
typesProperty
public javafx.beans.property.ReadOnlyListProperty<PathElementType> typesProperty()
Replies the types property.- Returns:
- the types property.
-
getPathElementCount
public int getPathElementCount()
Description copied from interface:Path2D
Replies the number of path elements in this path.- Specified by:
getPathElementCount
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the number of path elements.
- See Also:
Path2D.getPathElementTypeAt(int)
-
getPathElementTypeAt
public PathElementType getPathElementTypeAt(int index)
Description copied from interface:Path2D
Replies the type of the path element at the given position in this path.- Specified by:
getPathElementTypeAt
in interfacePath2D<Shape2ifx<?>,Path2ifx,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
index
- the index of the path element.- Returns:
- the type of the path element.
- See Also:
Path2D.getPathElementCount()
-
-