public static class CubicCurve2D.Float extends CubicCurve2D
CubicCurve2D.FloatCubicCurve2D.Double, CubicCurve2D.Float| Modifier and Type | Field and Description |
|---|---|
float |
ctrlx1
The x coordinate of the curve’s first control point.
|
float |
ctrlx2
The x coordinate of the curve’s second control point.
|
float |
ctrly1
The y coordinate of the curve’s first control point.
|
float |
ctrly2
The y coordinate of the curve’s second control point.
|
float |
x1
The x coordinate of the curve’s start point.
|
float |
x2
The x coordinate of the curve’s end point.
|
float |
y1
The y coordinate of the curve’s start point.
|
float |
y2
The y coordinate of the curve’s end point.
|
| Constructor and Description |
|---|
CubicCurve2D.Float()
Constructs a new CubicCurve2D that stores its coordinate values
in single-precision floating-point format.
|
CubicCurve2D.Float(float x1,
float y1,
float cx1,
float cy1,
float cx2,
float cy2,
float x2,
float y2)
Constructs a new CubicCurve2D that stores its coordinate values
in single-precision floating-point format, specifying the
initial position of each point.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds2D()
Determines the smallest rectangle that encloses the
curve’s start, end and control points.
|
Point2D |
getCtrlP1()
Returns the curve’s first control point.
|
Point2D |
getCtrlP2()
Returns the curve’s second control point.
|
double |
getCtrlX1()
Returns the x coordinate of the curve’s first
control point.
|
double |
getCtrlX2()
Returns the s coordinate of the curve’s second
control point.
|
double |
getCtrlY1()
Returns the y coordinate of the curve’s first
control point.
|
double |
getCtrlY2()
Returns the y coordinate of the curve’s second
control point.
|
Point2D |
getP1()
Returns the curve’s start point.
|
Point2D |
getP2()
Returns the curve’s end point.
|
double |
getX1()
Returns the x coordinate of the curve’s start
point.
|
double |
getX2()
Returns the x coordinate of the curve’s end
point.
|
double |
getY1()
Returns the y coordinate of the curve’s start
point.
|
double |
getY2()
Returns the y coordinate of the curve’s end
point.
|
void |
setCurve(double x1,
double y1,
double cx1,
double cy1,
double cx2,
double cy2,
double x2,
double y2)
Changes the curve geometry, separately specifying each coordinate
value as a double-precision floating-point number.
|
void |
setCurve(float x1,
float y1,
float cx1,
float cy1,
float cx2,
float cy2,
float x2,
float y2)
Changes the curve geometry, separately specifying each coordinate
value as a single-precision floating-point number.
|
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveCubic, solveCubic, subdivide, subdivide, subdividepublic float x1
public float y1
public float ctrlx1
public float ctrly1
public float ctrlx2
public float ctrly2
public float x2
public float y2
public CubicCurve2D.Float()
public CubicCurve2D.Float(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2)

x1 - the x coordinate of the curve’s start
point.y1 - the y coordinate of the curve’s start
point.cx1 - the x coordinate of the curve’s first
control point.cy1 - the y coordinate of the curve’s first
control point.cx2 - the x coordinate of the curve’s second
control point.cy2 - the y coordinate of the curve’s second
control point.x2 - the x coordinate of the curve’s end
point.y2 - the y coordinate of the curve’s end
point.public double getX1()
getX1 in class CubicCurve2Dpublic double getY1()
getY1 in class CubicCurve2Dpublic Point2D getP1()
getP1 in class CubicCurve2Dpublic double getCtrlX1()
getCtrlX1 in class CubicCurve2Dpublic double getCtrlY1()
getCtrlY1 in class CubicCurve2Dpublic Point2D getCtrlP1()
getCtrlP1 in class CubicCurve2Dpublic double getCtrlX2()
getCtrlX2 in class CubicCurve2Dpublic double getCtrlY2()
getCtrlY2 in class CubicCurve2Dpublic Point2D getCtrlP2()
getCtrlP2 in class CubicCurve2Dpublic double getX2()
getX2 in class CubicCurve2Dpublic double getY2()
getY2 in class CubicCurve2Dpublic Point2D getP2()
getP2 in class CubicCurve2Dpublic void setCurve(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2)

setCurve in class CubicCurve2Dx1 - the x coordinate of the curve’s new start
point.y1 - the y coordinate of the curve’s new start
point.cx1 - the x coordinate of the curve’s new
first control point.cy1 - the y coordinate of the curve’s new
first control point.cx2 - the x coordinate of the curve’s new
second control point.cy2 - the y coordinate of the curve’s new
second control point.x2 - the x coordinate of the curve’s new end
point.y2 - the y coordinate of the curve’s new end
point.public void setCurve(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2)

x1 - the x coordinate of the curve’s new start
point.y1 - the y coordinate of the curve’s new start
point.cx1 - the x coordinate of the curve’s new
first control point.cy1 - the y coordinate of the curve’s new
first control point.cx2 - the x coordinate of the curve’s new
second control point.cy2 - the y coordinate of the curve’s new
second control point.x2 - the x coordinate of the curve’s new end
point.y2 - the y coordinate of the curve’s new end
point.public Rectangle2D getBounds2D()

Shape.getBounds()