|
|||||||||
| Home >> All >> java >> awt >> [ geom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt.geom
Class CubicCurve2D.Float

java.lang.Objectjava.awt.geom.CubicCurve2D
java.awt.geom.CubicCurve2D.Float
- All Implemented Interfaces:
- java.lang.Cloneable, java.awt.Shape
- Enclosing class:
- CubicCurve2D
- public static class CubicCurve2D.Float
- extends CubicCurve2D
A two-dimensional curve that is parameterized with a cubic function and stores coordinate values in single-precision floating-point format.
| Nested Class Summary |
| Nested classes inherited from class java.awt.geom.CubicCurve2D |
CubicCurve2D.Double, CubicCurve2D.Float |
| Field Summary | |
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. |
| Fields inherited from class java.awt.geom.CubicCurve2D |
|
| Constructor Summary | |
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. |
|
| Method Summary | |
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. |
| Methods inherited from class java.awt.geom.CubicCurve2D |
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveCubic, solveCubic, subdivide, subdivide, subdivide |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
x1
public float x1
- The x coordinate of the curve’s start point.
y1
public float y1
- The y coordinate of the curve’s start point.
ctrlx1
public float ctrlx1
- The x coordinate of the curve’s first control point.
ctrly1
public float ctrly1
- The y coordinate of the curve’s first control point.
ctrlx2
public float ctrlx2
- The x coordinate of the curve’s second control point.
ctrly2
public float ctrly2
- The y coordinate of the curve’s second control point.
x2
public float x2
- The x coordinate of the curve’s end point.
y2
public float y2
- The y coordinate of the curve’s end point.
| Constructor Detail |
CubicCurve2D.Float
public CubicCurve2D.Float()
- Constructs a new CubicCurve2D that stores its coordinate values
in single-precision floating-point format. All points are
initially at position (0, 0).
CubicCurve2D.Float
public 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.
| Method Detail |
getX1
public double getX1()
- Returns the x coordinate of the curve’s start
point.
- Specified by:
getX1in classCubicCurve2D
getY1
public double getY1()
- Returns the y coordinate of the curve’s start
point.
- Specified by:
getY1in classCubicCurve2D
getP1
public Point2D getP1()
- Returns the curve’s start point.
- Specified by:
getP1in classCubicCurve2D
getCtrlX1
public double getCtrlX1()
- Returns the x coordinate of the curve’s first
control point.
- Specified by:
getCtrlX1in classCubicCurve2D
getCtrlY1
public double getCtrlY1()
- Returns the y coordinate of the curve’s first
control point.
- Specified by:
getCtrlY1in classCubicCurve2D
getCtrlP1
public Point2D getCtrlP1()
- Returns the curve’s first control point.
- Specified by:
getCtrlP1in classCubicCurve2D
getCtrlX2
public double getCtrlX2()
- Returns the s coordinate of the curve’s second
control point.
- Specified by:
getCtrlX2in classCubicCurve2D
getCtrlY2
public double getCtrlY2()
- Returns the y coordinate of the curve’s second
control point.
- Specified by:
getCtrlY2in classCubicCurve2D
getCtrlP2
public Point2D getCtrlP2()
- Returns the curve’s second control point.
- Specified by:
getCtrlP2in classCubicCurve2D
getX2
public double getX2()
- Returns the x coordinate of the curve’s end
point.
- Specified by:
getX2in classCubicCurve2D
getY2
public double getY2()
- Returns the y coordinate of the curve’s end
point.
- Specified by:
getY2in classCubicCurve2D
getP2
public Point2D getP2()
- Returns the curve’s end point.
- Specified by:
getP2in classCubicCurve2D
setCurve
public 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.
- Specified by:
setCurvein classCubicCurve2D
setCurve
public 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.
getBounds2D
public Rectangle2D getBounds2D()
- Determines the smallest rectangle that encloses the
curve’s start, end and control points. As the
illustration below shows, the invisible control points may cause
the bounds to be much larger than the area that is actually
covered by the curve.
|
|||||||||
| Home >> All >> java >> awt >> [ geom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC