public class CubicCurveTo extends PathElement
(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);
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.
|
Modifier and Type | Method and Description |
---|---|
DoubleProperty |
controlX1Property() |
DoubleProperty |
controlX2Property() |
DoubleProperty |
controlY1Property() |
DoubleProperty |
controlY2Property() |
double |
getControlX1() |
double |
getControlX2() |
double |
getControlY1() |
double |
getControlY2() |
double |
getX() |
double |
getY() |
void |
impl_addTo(Path2D path)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
void |
setControlX1(double value) |
void |
setControlX2(double value) |
void |
setControlY1(double value) |
void |
setControlY2(double value) |
void |
setX(double value) |
void |
setY(double value) |
String |
toString()
Returns a string representation of this
CubicCurveTo object. |
DoubleProperty |
xProperty() |
DoubleProperty |
yProperty() |
absoluteProperty, isAbsolute, setAbsolute
public CubicCurveTo()
public CubicCurveTo(double controlX1, double controlY1, double controlX2, double controlY2, double x, double y)
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 pointpublic final void setControlX1(double value)
public final double getControlX1()
public final DoubleProperty controlX1Property()
public final void setControlY1(double value)
public final double getControlY1()
public final DoubleProperty controlY1Property()
public final void setControlX2(double value)
public final double getControlX2()
public final DoubleProperty controlX2Property()
public final void setControlY2(double value)
public final double getControlY2()
public final DoubleProperty controlY2Property()
public final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
@Deprecated public void impl_addTo(Path2D path)
impl_addTo
in class PathElement
Copyright © 2020. All rights reserved.