public static class QuadCurve2D.Float extends QuadCurve2D implements Serializable
float坐标。
QuadCurve2D.Double, QuadCurve2D.Float| Modifier and Type | Field and Description |
|---|---|
float |
ctrlx
二次曲线段控制点的X坐标。
|
float |
ctrly
二次曲线段控制点的Y坐标。
|
float |
x1
二次曲线段起始点的X坐标。
|
float |
x2
二次曲线段终点的X坐标。
|
float |
y1
二次曲线段起始点的Y坐标。
|
float |
y2
二次曲线段的终点的Y坐标。
|
| Constructor and Description |
|---|
Float()
构造并初始化坐标(0,0,0,0,0,0)的
QuadCurve2D 。
|
Float(float x1, float y1, float ctrlx, float ctrly, float x2, float y2)
构造并初始化一个
QuadCurve2D从指定的
float坐标。
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds2D()
返回
Shape比
getBounds方法更高精度和更准确的边界框。
|
Point2D |
getCtrlPt()
返回控制点。
|
double |
getCtrlX()
以double精度返回控制点的
double坐标。
|
double |
getCtrlY()
返回控制点的Y坐标在
double精度。
|
Point2D |
getP1()
返回起始点。
|
Point2D |
getP2()
返回终点。
|
double |
getX1()
返回X起点在协调
double精度。
|
double |
getX2()
返回终点的X坐标在
double精度。
|
double |
getY1()
返回起始点的Y坐标在
double精度。
|
double |
getY2()
返回终点的Y坐标在
double精度。
|
void |
setCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
将该曲线的终点和控制点的位置设置为指定的
double坐标。
|
void |
setCurve(float x1, float y1, float ctrlx, float ctrly, float x2, float y2)
将该曲线的终点和控制点的位置设置为指定的
float坐标。
|
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdividepublic float x1
public float y1
public float ctrlx
public float ctrly
public float x2
public float y2
public Float()
QuadCurve2D 。
public Float(float x1,
float y1,
float ctrlx,
float ctrly,
float x2,
float y2)
QuadCurve2D从指定的
float坐标。
x1 -
x1的X坐标
y1 -
y1的Y坐标
ctrlx - 控制点的X坐标
ctrly - 控制点的Y坐标
x2 - 终点的X坐标
y2 - 终点的Y坐标
public double getX1()
double精度。
getX1在类别
QuadCurve2D
public double getY1()
double精度。
getY1在类别
QuadCurve2D
public Point2D getP1()
getP1在类别
QuadCurve2D
Point2D是这个
QuadCurve2D 。
public double getCtrlX()
double坐标。
getCtrlX在类别
QuadCurve2D
public double getCtrlY()
double坐标。
getCtrlY在类别
QuadCurve2D
public Point2D getCtrlPt()
getCtrlPt在类别
QuadCurve2D
Point2D是这个
Point2D的控制点。
public double getX2()
double精度。
getX2在类别
QuadCurve2D
public double getY2()
double精度。
getY2在类别
QuadCurve2D
public Point2D getP2()
getP2在类别
QuadCurve2D
Point对象是这个
Point2D 。
public void setCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
double坐标。
setCurve在类别
QuadCurve2D
x1 -
x1的X坐标
y1 -
y1的Y坐标
ctrlx - 控制点的X坐标
ctrly - 控制点的Y坐标
x2 - 终点的X坐标
y2 - 终点的Y坐标
public void setCurve(float x1,
float y1,
float ctrlx,
float ctrly,
float x2,
float y2)
float坐标。
x1 -
x1的X坐标
y1 -
y1的Y坐标
ctrlx - 控制点的X坐标
ctrly - 控制点的Y坐标
x2 - 终点的X坐标
y2 - 终点的Y坐标
public Rectangle2D getBounds2D()
Shape比getBounds方法返回一个高精度和更准确的边界框。
需要注意的是没有保证返回Rectangle2D是最小的边框包围Shape ,只表示Shape完全在指定的范围内Rectangle2D 。
通过此方法返回的边界框通常比通过返回的更紧密getBounds方法,而且永远不会因为溢出问题,因为返回值可以是实例Rectangle2D一个使用双精度值存储尺寸。
请注意, definition of insideness可能导致在返回的bounds对象中可能不会将shape定义大纲上的shape包含的情况,但仅在原始shape未考虑这些点的情况下。
如果point是内部shape根据contains(point)方法,那么它必须是内部返回Rectangle2D界限根据对象contains(point)所述的方法bounds 。 特别:
shape.contains(p)要求bounds.contains(p)
如果point不在shape ,那么它可能仍然包含在bounds对象中:
bounds.contains(p)并不表示shape.contains(p)
getBounds2D在界面
Shape
Rectangle2D那是一个高精度边界框
Shape 。
Shape.getBounds()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.