Class QuadCurveTo
java.lang.Object
javafx.scene.shape.PathElement
javafx.scene.shape.QuadCurveTo
Creates a curved path element, defined by two new points,
by drawing a Quadratic Bézier curve that intersects both the current coordinates
and the specified coordinates
(x, y)
,
using the specified point (controlX, controlY)
as a Bézier control point.
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(50.0f); QuadCurveTo quadTo = new QuadCurveTo(); quadTo.setControlX(25.0f); quadTo.setControlY(0.0f); quadTo.setX(50.0f); quadTo.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 quadratic control point.final DoubleProperty
Defines the Y coordinate of the quadratic 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 QuadCurveTo.QuadCurveTo
(double controlX, double controlY, double x, double y) Creates a new instance of QuadCurveTo. -
Method Summary
Modifier and TypeMethodDescriptionfinal DoubleProperty
Defines the X coordinate of the quadratic control point.final DoubleProperty
Defines the Y coordinate of the quadratic control point.final double
Gets the value of thecontrolX
property.final double
Gets the value of thecontrolY
property.final double
getX()
Gets the value of thex
property.final double
getY()
Gets the value of they
property.final void
setControlX
(double value) Sets the value of thecontrolX
property.final void
setControlY
(double value) Sets the value of thecontrolY
property.final void
setX
(double value) Sets the value of thex
property.final void
setY
(double value) Sets the value of they
property.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
-
controlX
Defines the X coordinate of the quadratic control point.- Default value:
- 0.0
- See Also:
-
controlY
Defines the Y coordinate of the quadratic 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
-
QuadCurveTo
public QuadCurveTo()Creates an empty instance of QuadCurveTo. -
QuadCurveTo
public QuadCurveTo(double controlX, double controlY, double x, double y) Creates a new instance of QuadCurveTo.- Parameters:
controlX
- the X coordinate of the quadratic control pointcontrolY
- the Y coordinate of the quadratic control pointx
- the X coordinate of the final end pointy
- the Y coordinate of the final end point
-
-
Method Details
-
setControlX
public final void setControlX(double value) Sets the value of thecontrolX
property.- Property description:
- Defines the X coordinate of the quadratic control point.
- Default value:
- 0.0
- Parameters:
value
- the value for thecontrolX
property- See Also:
-
getControlX
public final double getControlX()Gets the value of thecontrolX
property.- Property description:
- Defines the X coordinate of the quadratic control point.
- Default value:
- 0.0
- Returns:
- the value of the
controlX
property - See Also:
-
controlXProperty
Defines the X coordinate of the quadratic control point.- Default value:
- 0.0
- Returns:
- the
controlX
property - See Also:
-
setControlY
public final void setControlY(double value) Sets the value of thecontrolY
property.- Property description:
- Defines the Y coordinate of the quadratic control point.
- Default value:
- 0.0
- Parameters:
value
- the value for thecontrolY
property- See Also:
-
getControlY
public final double getControlY()Gets the value of thecontrolY
property.- Property description:
- Defines the Y coordinate of the quadratic control point.
- Default value:
- 0.0
- Returns:
- the value of the
controlY
property - See Also:
-
controlYProperty
Defines the Y coordinate of the quadratic control point.- Default value:
- 0.0
- Returns:
- the
controlY
property - See Also:
-
setX
public final void setX(double value) Sets the value of thex
property.- Property description:
- Defines the X coordinate of the final end point.
- Default value:
- 0.0
- Parameters:
value
- the value for thex
property- See Also:
-
getX
public final double getX()Gets the value of thex
property.- Property description:
- Defines the X coordinate of the final end point.
- Default value:
- 0.0
- Returns:
- the value of the
x
property - See Also:
-
xProperty
Defines the X coordinate of the final end point.- Default value:
- 0.0
- Returns:
- the
x
property - See Also:
-
setY
public final void setY(double value) Sets the value of they
property.- Property description:
- Defines the Y coordinate of the final end point.
- Default value:
- 0.0
- Parameters:
value
- the value for they
property- See Also:
-
getY
public final double getY()Gets the value of they
property.- Property description:
- Defines the Y coordinate of the final end point.
- Default value:
- 0.0
- Returns:
- the value of the
y
property - See Also:
-
yProperty
Defines the Y coordinate of the final end point.- Default value:
- 0.0
- Returns:
- the
y
property - See Also:
-
toString
-