JavaFX 8.0
javafx.scene.shape

## Class 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);

```
• ### Property Summary

All Methods
Type Property and Description
`DoubleProperty` `controlX1`
Defines the X coordinate of the first Bézier control point.
`DoubleProperty` `controlX2`
Defines the X coordinate of the second Bézier control point.
`DoubleProperty` `controlY1`
Defines the Y coordinate of the first Bézier control point.
`DoubleProperty` `controlY2`
Defines the Y coordinate of the second Bézier control point.
`DoubleProperty` `x`
Defines the X coordinate of the final end point.
`DoubleProperty` `y`
Defines the Y coordinate of the final end point.
• ### Properties inherited from class javafx.scene.shape.PathElement

`absolute`
• ### Constructor Summary

Constructors
Constructor and 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 Summary

All Methods
Modifier and Type Method and Description
`DoubleProperty` `controlX1Property()`
Defines the X coordinate of the first Bézier control point.
`DoubleProperty` `controlX2Property()`
Defines the X coordinate of the second Bézier control point.
`DoubleProperty` `controlY1Property()`
Defines the Y coordinate of the first Bézier control point.
`DoubleProperty` `controlY2Property()`
Defines the Y coordinate of the second Bézier control point.
`double` `getControlX1()`
Gets the value of the property controlX1.
`double` `getControlX2()`
Gets the value of the property controlX2.
`double` `getControlY1()`
Gets the value of the property controlY1.
`double` `getControlY2()`
Gets the value of the property controlY2.
`double` `getX()`
Gets the value of the property x.
`double` `getY()`
Gets the value of the property y.
`void` `setControlX1(double value)`
Sets the value of the property controlX1.
`void` `setControlX2(double value)`
Sets the value of the property controlX2.
`void` `setControlY1(double value)`
Sets the value of the property controlY1.
`void` `setControlY2(double value)`
Sets the value of the property controlY2.
`void` `setX(double value)`
Sets the value of the property x.
`void` `setY(double value)`
Sets the value of the property y.
`java.lang.String` `toString()`
Returns a string representation of this `CubicCurveTo` object.
`DoubleProperty` `xProperty()`
Defines the X coordinate of the final end point.
`DoubleProperty` `yProperty()`
Defines the Y coordinate of the final end point.
• ### Methods inherited from class javafx.scene.shape.PathElement

`absoluteProperty, isAbsolute, setAbsolute`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### 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 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 Detail

• #### 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
• #### 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
• #### 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
• #### 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
• #### 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
• #### 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
• #### toString

`public java.lang.String toString()`
Returns a string representation of this `CubicCurveTo` object.
Overrides:
`toString` in class `java.lang.Object`
Returns:
a string representation of this `CubicCurveTo` object.
JavaFX 8.0

Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.

Spec-Zone.ru - all specs in one place