java.lang.Object
javafx.scene.shape.PathElement
javafx.scene.shape.CubicCurveTo
Creates a curved path element, defined by three new points,
by drawing a Cubic Bézier curve that intersects both the current coordinates
and the specified coordinates
(x,y)
, using the
specified points (controlX1,controlY1)
and (controlX2,controlY2)
as Bézier control points. All coordinates are specified in double precision.
For more information on path elements see the Path
and
PathElement
classes.
Example:
import javafx.scene.shape.*; Path path = new Path(); MoveTo moveTo = new MoveTo(); moveTo.setX(0.0f); moveTo.setY(0.0f); CubicCurveTo cubicTo = new CubicCurveTo(); cubicTo.setControlX1(0.0f); cubicTo.setControlY1(0.0f); cubicTo.setControlX2(100.0f); cubicTo.setControlY2(100.0f); cubicTo.setX(100.0f); cubicTo.setY(50.0f); path.getElements().add(moveTo); path.getElements().add(cubicTo);
- Since:
- JavaFX 2.0
-
Property Summary
TypePropertyDescriptionfinal DoubleProperty
Defines the X coordinate of the first Bézier control point.final DoubleProperty
Defines the X coordinate of the second Bézier control point.final DoubleProperty
Defines the Y coordinate of the first Bézier control point.final DoubleProperty
Defines the Y coordinate of the second Bézier control point.final DoubleProperty
Defines the X coordinate of the final end point.final DoubleProperty
Defines the Y coordinate of the final end point.Properties declared in class javafx.scene.shape.PathElement
absolute
-
Constructor Summary
ConstructorDescriptionCreates an empty instance of CubicCurveTo.CubicCurveTo
(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y) Creates a new instance of CubicCurveTo. -
Method Summary
Modifier and TypeMethodDescriptionfinal DoubleProperty
Defines the X coordinate of the first Bézier control point.final DoubleProperty
Defines the X coordinate of the second Bézier control point.final DoubleProperty
Defines the Y coordinate of the first Bézier control point.final DoubleProperty
Defines the Y coordinate of the second Bézier control point.final double
Gets the value of the property controlX1.final double
Gets the value of the property controlX2.final double
Gets the value of the property controlY1.final double
Gets the value of the property controlY2.final double
getX()
Gets the value of the property x.final double
getY()
Gets the value of the property y.final void
setControlX1
(double value) Sets the value of the property controlX1.final void
setControlX2
(double value) Sets the value of the property controlX2.final void
setControlY1
(double value) Sets the value of the property controlY1.final void
setControlY2
(double value) Sets the value of the property controlY2.final void
setX
(double value) Sets the value of the property x.final void
setY
(double value) Sets the value of the property y.toString()
Returns a string representation of thisCubicCurveTo
object.final DoubleProperty
Defines the X coordinate of the final end point.final DoubleProperty
Defines the Y coordinate of the final end point.Methods declared in class javafx.scene.shape.PathElement
absoluteProperty, isAbsolute, setAbsolute
-
Property Details
-
controlX1
Defines the X coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
-
controlY1
Defines the Y coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
-
controlX2
Defines the X coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
-
controlY2
Defines the Y coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
-
x
Defines the X coordinate of the final end point.- Default value:
- 0.0
- See Also:
-
y
Defines the Y coordinate of the final end point.- Default value:
- 0.0
- See Also:
-
-
Constructor Details
-
CubicCurveTo
public CubicCurveTo()Creates an empty instance of CubicCurveTo. -
CubicCurveTo
public CubicCurveTo(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y) Creates a new instance of CubicCurveTo.- Parameters:
controlX1
- the X coordinate of the first Bézier control pointcontrolY1
- the Y coordinate of the first Bézier control pointcontrolX2
- the X coordinate of the second Bézier control pointcontrolY2
- the Y coordinate of the second Bézier control pointx
- the X coordinate of the final end pointy
- the Y coordinate of the final end point
-
-
Method Details
-
setControlX1
public final void setControlX1(double value) Sets the value of the property controlX1.- Property description:
- Defines the X coordinate of the first Bézier control point.
- Default value:
- 0.0
-
getControlX1
public final double getControlX1()Gets the value of the property controlX1.- Property description:
- Defines the X coordinate of the first Bézier control point.
- Default value:
- 0.0
-
controlX1Property
Defines the X coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
-
setControlY1
public final void setControlY1(double value) Sets the value of the property controlY1.- Property description:
- Defines the Y coordinate of the first Bézier control point.
- Default value:
- 0.0
-
getControlY1
public final double getControlY1()Gets the value of the property controlY1.- Property description:
- Defines the Y coordinate of the first Bézier control point.
- Default value:
- 0.0
-
controlY1Property
Defines the Y coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
-
setControlX2
public final void setControlX2(double value) Sets the value of the property controlX2.- Property description:
- Defines the X coordinate of the second Bézier control point.
- Default value:
- 0.0
-
getControlX2
public final double getControlX2()Gets the value of the property controlX2.- Property description:
- Defines the X coordinate of the second Bézier control point.
- Default value:
- 0.0
-
controlX2Property
Defines the X coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
-
setControlY2
public final void setControlY2(double value) Sets the value of the property controlY2.- Property description:
- Defines the Y coordinate of the second Bézier control point.
- Default value:
- 0.0
-
getControlY2
public final double getControlY2()Gets the value of the property controlY2.- Property description:
- Defines the Y coordinate of the second Bézier control point.
- Default value:
- 0.0
-
controlY2Property
Defines the Y coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
-
setX
public final void setX(double value) Sets the value of the property x.- Property description:
- Defines the X coordinate of the final end point.
- Default value:
- 0.0
-
getX
public final double getX()Gets the value of the property x.- Property description:
- Defines the X coordinate of the final end point.
- Default value:
- 0.0
-
xProperty
Defines the X coordinate of the final end point.- Default value:
- 0.0
- See Also:
-
setY
public final void setY(double value) Sets the value of the property y.- Property description:
- Defines the Y coordinate of the final end point.
- Default value:
- 0.0
-
getY
public final double getY()Gets the value of the property y.- Property description:
- Defines the Y coordinate of the final end point.
- Default value:
- 0.0
-
yProperty
Defines the Y coordinate of the final end point.- Default value:
- 0.0
- See Also:
-
toString
Returns a string representation of thisCubicCurveTo
object.
-