Class PathElement2dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.dfx.PathElement2dfx
-
- All Implemented Interfaces:
Serializable,Cloneable,PathElement2afp,PathElement2D
- Direct Known Subclasses:
PathElement2dfx.ArcPathElement2dfx,PathElement2dfx.ClosePathElement2dfx,PathElement2dfx.CurvePathElement2dfx,PathElement2dfx.LinePathElement2dfx,PathElement2dfx.MovePathElement2dfx,PathElement2dfx.QuadPathElement2dfx
public abstract class PathElement2dfx extends Object implements PathElement2afp
An element of the path.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND, Hamza JAFFALI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classPathElement2dfx.ArcPathElement2dfxAn element of the path that represents aARC_TO.(package private) static classPathElement2dfx.ClosePathElement2dfxAn element of the path that represents aCLOSE.(package private) static classPathElement2dfx.CurvePathElement2dfxAn element of the path that represents aCURVE_TO.(package private) static classPathElement2dfx.LinePathElement2dfxAn element of the path that represents aLINE_TO.(package private) static classPathElement2dfx.MovePathElement2dfxAn element of the path that represents aMOVE_TO.(package private) static classPathElement2dfx.QuadPathElement2dfxAn element of the path that represents aQUAD_TO.
-
Field Summary
Fields Modifier and Type Field Description protected javafx.beans.property.ReadOnlyBooleanWrapperisEmptyIs Empty property.protected Point2dfxtoTarget point.protected PathElementTypetypeType of the element.
-
Constructor Summary
Constructors Constructor Description PathElement2dfx(PathElementType type, javafx.beans.property.DoubleProperty tox, javafx.beans.property.DoubleProperty toy)Constructor.PathElement2dfx(PathElementType type, Point2dfx toPoint)Constructor by setting the destination point.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.DoublePropertyctrlX1Property()Replies the property for the x coordinate of the first control point.javafx.beans.property.DoublePropertyctrlX2Property()Replies the property for the x coordinate of the second control point.javafx.beans.property.DoublePropertyctrlY1Property()Replies the property for the y coordinate of the first control point.javafx.beans.property.DoublePropertyctrlY2Property()Replies the property for the y coordinate of the second control point.abstract booleanequals(Object obj)abstract javafx.beans.property.DoublePropertyfromXProperty()Replies the property for the x coordinate of the starting point.abstract javafx.beans.property.DoublePropertyfromYProperty()Replies the property for the y coordinate of the starting point.doublegetCtrlX1()Replies the x coordinate of the first control point.doublegetCtrlX2()Replies the x coordinate of the second control point.doublegetCtrlY1()Replies the y coordinate of the first control point.doublegetCtrlY2()Replies the y coordinate of the second control point.booleangetLargeArcFlag()Replies if the arc-to will sweep clockwise around the ellipse.doublegetRadiusX()Replies the x radius of the arc-to ellipse.doublegetRadiusY()Replies the y radius of the arc-to ellipse.doublegetRotationX()Replies the rotation of the x axis of the arc-to ellipse.booleangetSweepFlag()Replies if the arc-to will sweep the long way around the ellipse.doublegetToX()Replies the x coordinate of the target point.doublegetToY()Replies the y coordinate of the target point.PathElementTypegetType()Replies the type of the element.abstract inthashCode()booleanisEmpty()Replies if the element is empty, ie. the points are the same.abstract javafx.beans.property.BooleanPropertyisEmptyProperty()Replies the property that indicates if this patth element is empty.javafx.beans.property.BooleanPropertylargeArcFlagProperty()Replies the property for the large ellipse arc flag.javafx.beans.property.DoublePropertyradiusXProperty()Replies the property for the radius along the x axis.javafx.beans.property.DoublePropertyradiusYProperty()Replies the property for the radius along the y axis.javafx.beans.property.DoublePropertyrotationXProperty()Replies the property for the rotation of the x axis.javafx.beans.property.BooleanPropertysweepFlagProperty()Replies the property for the sweep ellipse arc flag.abstract javafx.beans.property.DoubleProperty[]toArray()Copy the coords into an array, except the source point.abstract voidtoArray(javafx.beans.property.DoubleProperty[] array)Copy the coords into the given array, except the source point.StringtoString()javafx.beans.property.DoublePropertytoXProperty()Replies the property for the x coordinate of the target point.javafx.beans.property.DoublePropertytoYProperty()Replies the property for the y coordinate of the target point.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.PathElement2afp
getFromX, getFromY, toArray, toArray
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.PathElement2D
isDrawable
-
-
-
-
Field Detail
-
type
protected final PathElementType type
Type of the element.
-
to
protected Point2dfx to
Target point.
-
isEmpty
protected javafx.beans.property.ReadOnlyBooleanWrapper isEmpty
Is Empty property.
-
-
Constructor Detail
-
PathElement2dfx
PathElement2dfx(PathElementType type, javafx.beans.property.DoubleProperty tox, javafx.beans.property.DoubleProperty toy)
Constructor.- Parameters:
type- is the type of the element.tox- the x coordinate of the target point.toy- the x coordinate of the target point.
-
PathElement2dfx
PathElement2dfx(PathElementType type, Point2dfx toPoint)
Constructor by setting the destination point.- Parameters:
type- is the type of the element.toPoint- the point to set as the target point.
-
-
Method Detail
-
isEmptyProperty
public abstract javafx.beans.property.BooleanProperty isEmptyProperty()
Replies the property that indicates if this patth element is empty.- Returns:
- the isEmpty property.
-
isEmpty
public boolean isEmpty()
Description copied from interface:PathElement2DReplies if the element is empty, ie. the points are the same.- Specified by:
isEmptyin interfacePathElement2D- Returns:
trueif the points are the same; otherwisefalse.
-
getToX
@Pure public final double getToX()
Description copied from interface:PathElement2afpReplies the x coordinate of the target point.- Specified by:
getToXin interfacePathElement2afp- Returns:
- the x coordinate.
-
getToY
@Pure public final double getToY()
Description copied from interface:PathElement2afpReplies the y coordinate of the target point.- Specified by:
getToYin interfacePathElement2afp- Returns:
- the y coordinate.
-
fromXProperty
@Pure public abstract javafx.beans.property.DoubleProperty fromXProperty()
Replies the property for the x coordinate of the starting point.- Returns:
- the x coordinate, or
nullif the type isPathElementType.MOVE_TO.
-
fromYProperty
@Pure public abstract javafx.beans.property.DoubleProperty fromYProperty()
Replies the property for the y coordinate of the starting point.- Returns:
- the y coordinate, or
nullif the type isPathElementType.MOVE_TO.
-
toXProperty
@Pure public javafx.beans.property.DoubleProperty toXProperty()
Replies the property for the x coordinate of the target point.- Returns:
- the x coordinate.
-
toYProperty
@Pure public javafx.beans.property.DoubleProperty toYProperty()
Replies the property for the y coordinate of the target point.- Returns:
- the y coordinate.
-
getType
@Pure public final PathElementType getType()
Description copied from interface:PathElement2DReplies the type of the element.- Specified by:
getTypein interfacePathElement2afp- Specified by:
getTypein interfacePathElement2D- Returns:
trueif the points are the same; otherwisefalse.
-
toArray
@Pure public abstract void toArray(javafx.beans.property.DoubleProperty[] array)
Copy the coords into the given array, except the source point.- Parameters:
array- the output array.
-
toArray
@Pure public abstract javafx.beans.property.DoubleProperty[] toArray()
Copy the coords into an array, except the source point.- Returns:
- the array of the points, except the source point.
-
getCtrlX1
public double getCtrlX1()
Description copied from interface:PathElement2afpReplies the x coordinate of the first control point.- Specified by:
getCtrlX1in interfacePathElement2afp- Returns:
- the x coordinate, or
0if the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
getCtrlY1
public double getCtrlY1()
Description copied from interface:PathElement2afpReplies the y coordinate of the first control point.- Specified by:
getCtrlY1in interfacePathElement2afp- Returns:
- the y coordinate, or
0if the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
getCtrlX2
public double getCtrlX2()
Description copied from interface:PathElement2afpReplies the x coordinate of the second control point.- Specified by:
getCtrlX2in interfacePathElement2afp- Returns:
- the x coordinate, or
0if the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
getCtrlY2
public double getCtrlY2()
Description copied from interface:PathElement2afpReplies the y coordinate of the second control point.- Specified by:
getCtrlY2in interfacePathElement2afp- Returns:
- the y coordinate, or
0if the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
getRadiusX
public double getRadiusX()
Description copied from interface:PathElement2afpReplies the x radius of the arc-to ellipse.- Specified by:
getRadiusXin interfacePathElement2afp- Returns:
- the x radius, or
0if the type is notPathElementType.ARC_TO.
-
getRadiusY
public double getRadiusY()
Description copied from interface:PathElement2afpReplies the y radius of the arc-to ellipse.- Specified by:
getRadiusYin interfacePathElement2afp- Returns:
- the y radius, or
0if the type is notPathElementType.ARC_TO.
-
getRotationX
public double getRotationX()
Description copied from interface:PathElement2afpReplies the rotation of the x axis of the arc-to ellipse.- Specified by:
getRotationXin interfacePathElement2afp- Returns:
- the x axis rotation, or
0if the type is notPathElementType.ARC_TO.
-
getSweepFlag
public boolean getSweepFlag()
Description copied from interface:PathElement2afpReplies if the arc-to will sweep the long way around the ellipse.- Specified by:
getSweepFlagin interfacePathElement2afp- Returns:
trueiff the element will sweep clockwise around the ellipse, or0if the type is notPathElementType.ARC_TO.
-
getLargeArcFlag
public boolean getLargeArcFlag()
Description copied from interface:PathElement2afpReplies if the arc-to will sweep clockwise around the ellipse.- Specified by:
getLargeArcFlagin interfacePathElement2afp- Returns:
trueiff the element will sweep clockwise around the ellipse, or0if the type is notPathElementType.ARC_TO.
-
ctrlX1Property
@Pure public javafx.beans.property.DoubleProperty ctrlX1Property()
Replies the property for the x coordinate of the first control point.- Returns:
- the x coordinate, or
nullif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
ctrlY1Property
@Pure public javafx.beans.property.DoubleProperty ctrlY1Property()
Replies the property for the y coordinate of the first control point.- Returns:
- the y coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO, orPathElementType.CLOSE.
-
ctrlX2Property
@Pure public javafx.beans.property.DoubleProperty ctrlX2Property()
Replies the property for the x coordinate of the second control point.- Returns:
- the x coordinate, or
nullif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
ctrlY2Property
@Pure public javafx.beans.property.DoubleProperty ctrlY2Property()
Replies the property for the y coordinate of the second control point.- Returns:
- the y coordinate, or
nullif the type isPathElementType.MOVE_TO,PathElementType.LINE_TO,PathElementType.QUAD_TO, orPathElementType.CLOSE.
-
radiusXProperty
@Pure public javafx.beans.property.DoubleProperty radiusXProperty()
Replies the property for the radius along the x axis.- Returns:
- the x radius, or
nullif the type is notPathElementType.ARC_TO.
-
radiusYProperty
@Pure public javafx.beans.property.DoubleProperty radiusYProperty()
Replies the property for the radius along the y axis.- Returns:
- the y radius, or
nullif the type is notPathElementType.ARC_TO.
-
rotationXProperty
@Pure public javafx.beans.property.DoubleProperty rotationXProperty()
Replies the property for the rotation of the x axis.- Returns:
- the x-axis rotation, or
nullif the type is notPathElementType.ARC_TO.
-
largeArcFlagProperty
@Pure public javafx.beans.property.BooleanProperty largeArcFlagProperty()
Replies the property for the large ellipse arc flag.- Returns:
- the flag, or
nullif the type is notPathElementType.ARC_TO.
-
sweepFlagProperty
@Pure public javafx.beans.property.BooleanProperty sweepFlagProperty()
Replies the property for the sweep ellipse arc flag.- Returns:
- the flag, or
nullif the type is notPathElementType.ARC_TO.
-
-