java.lang.Object
javafx.scene.shape.PathElement
javafx.scene.shape.CubicCurveTo
public class CubicCurveTo extends PathElement
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 SummaryProperties Type Property Description DoublePropertycontrolX1Defines the X coordinate of the first Bézier control point.DoublePropertycontrolX2Defines the X coordinate of the second Bézier control point.DoublePropertycontrolY1Defines the Y coordinate of the first Bézier control point.DoublePropertycontrolY2Defines the Y coordinate of the second Bézier control point.DoublePropertyxDefines the X coordinate of the final end point.DoublePropertyyDefines the Y coordinate of the final end point.Properties declared in class javafx.scene.shape.PathElementabsolute
- 
Constructor SummaryConstructors Constructor Description CubicCurveTo()Creates 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 SummaryModifier and Type Method Description DoublePropertycontrolX1Property()Defines the X coordinate of the first Bézier control point.DoublePropertycontrolX2Property()Defines the X coordinate of the second Bézier control point.DoublePropertycontrolY1Property()Defines the Y coordinate of the first Bézier control point.DoublePropertycontrolY2Property()Defines the Y coordinate of the second Bézier control point.doublegetControlX1()Gets the value of the property controlX1.doublegetControlX2()Gets the value of the property controlX2.doublegetControlY1()Gets the value of the property controlY1.doublegetControlY2()Gets the value of the property controlY2.doublegetX()Gets the value of the property x.doublegetY()Gets the value of the property y.voidsetControlX1(double value)Sets the value of the property controlX1.voidsetControlX2(double value)Sets the value of the property controlX2.voidsetControlY1(double value)Sets the value of the property controlY1.voidsetControlY2(double value)Sets the value of the property controlY2.voidsetX(double value)Sets the value of the property x.voidsetY(double value)Sets the value of the property y.StringtoString()Returns a string representation of thisCubicCurveToobject.DoublePropertyxProperty()Defines the X coordinate of the final end point.DoublePropertyyProperty()Defines the Y coordinate of the final end point.Methods declared in class javafx.scene.shape.PathElementabsoluteProperty, isAbsolute, setAbsolute
- 
Property Details- 
controlX1Defines the X coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
- getControlX1(),- setControlX1(double)
 
- 
controlY1Defines the Y coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
- getControlY1(),- setControlY1(double)
 
- 
controlX2Defines the X coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
- getControlX2(),- setControlX2(double)
 
- 
controlY2Defines the Y coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
- getControlY2(),- setControlY2(double)
 
- 
xDefines the X coordinate of the final end point.- Default value:
- 0.0
- See Also:
- getX(),- setX(double)
 
- 
yDefines the Y coordinate of the final end point.- Default value:
- 0.0
- See Also:
- getY(),- setY(double)
 
 
- 
- 
Constructor Details- 
CubicCurveTopublic CubicCurveTo()Creates an empty instance of CubicCurveTo.
- 
CubicCurveTopublic 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 point
- controlY1- the Y coordinate of the first Bézier control point
- controlX2- the X coordinate of the second Bézier control point
- controlY2- the Y coordinate of the second Bézier control point
- x- the X coordinate of the final end point
- y- the Y coordinate of the final end point
 
 
- 
- 
Method Details- 
setControlX1public 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
 
- 
getControlX1public 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
 
- 
controlX1PropertyDefines the X coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
- getControlX1(),- setControlX1(double)
 
- 
setControlY1public 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
 
- 
getControlY1public 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
 
- 
controlY1PropertyDefines the Y coordinate of the first Bézier control point.- Default value:
- 0.0
- See Also:
- getControlY1(),- setControlY1(double)
 
- 
setControlX2public 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
 
- 
getControlX2public 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
 
- 
controlX2PropertyDefines the X coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
- getControlX2(),- setControlX2(double)
 
- 
setControlY2public 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
 
- 
getControlY2public 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
 
- 
controlY2PropertyDefines the Y coordinate of the second Bézier control point.- Default value:
- 0.0
- See Also:
- getControlY2(),- setControlY2(double)
 
- 
setXpublic 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
 
- 
getXpublic 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
 
- 
xPropertyDefines the X coordinate of the final end point.- Default value:
- 0.0
- See Also:
- getX(),- setX(double)
 
- 
setYpublic 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
 
- 
getYpublic 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
 
- 
yPropertyDefines the Y coordinate of the final end point.- Default value:
- 0.0
- See Also:
- getY(),- setY(double)
 
- 
toStringReturns a string representation of thisCubicCurveToobject.
 
-