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()
构造和初始化一个
QuadCurve2D坐标(0,0,0,0,0,0)。
|
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精度控制点的X坐标。
|
double |
getCtrlY()
返回在
double精度控制点的Y坐标。
|
Point2D |
getP1()
返回起始点。
|
Point2D |
getP2()
返回终点。
|
double |
getX1()
返回在精度
double起始点的X坐标。
|
double |
getX2()
返回在
double精密的结束点的X坐标。
|
double |
getY1()
返回在
double精度出发点的Y坐标。
|
double |
getY2()
返回在
double精度的结束点的Y坐标。
|
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坐标(0,0,0,0,0,0)。
public Float(float x1,
float y1,
float ctrlx,
float ctrly,
float x2,
float y2)
QuadCurve2D从指定的
float坐标。
x1 -起始点的x坐标
y1 -出发点的Y坐标
ctrlx -控制点的x坐标
ctrly -控制点的Y坐标
x2 -结束点的X坐标
y2 -结束点的Y坐标
public double getX1()
double起始点的X坐标。
getX1 方法重写,继承类
QuadCurve2D
public double getY1()
double精度出发点的Y坐标。
getY1 方法重写,继承类
QuadCurve2D
public Point2D getP1()
getP1 方法重写,继承类
QuadCurve2D
Point2D是这个
QuadCurve2D起点。
public double getCtrlX()
double精度控制点的X坐标。
getCtrlX 方法重写,继承类
QuadCurve2D
public double getCtrlY()
double精度控制点的Y坐标。
getCtrlY 方法重写,继承类
QuadCurve2D
public Point2D getCtrlPt()
getCtrlPt 方法重写,继承类
QuadCurve2D
Point2D是这个
Point2D控制点。
public double getX2()
double精密的结束点的X坐标。
getX2 方法重写,继承类
QuadCurve2D
public double getY2()
double精度的结束点的Y坐标。
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 -起始点的x坐标
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 -起始点的x坐标
y1 -出发点的Y坐标
ctrlx -控制点的x坐标
ctrly -控制点的Y坐标
x2 -结束点的X坐标
y2 -结束点的Y坐标
public Rectangle2D getBounds2D()
Shape比
getBounds方法。需要注意的是不能保证返回的
Rectangle2D是最小包围盒包围
Shape,只有
Shape完全在于在显示
Rectangle2D。包围盒返回此方法通常是更严格的比
getBounds返回的方法,永远不会失败由于溢出的问题由于返回值可以使用双精度值存储维度的
Rectangle2D实例。
请注意, definition of insideness可导致的情况下,点上的shape定义轮廓可能不被视为包含在返回的bounds对象,但只有在这些点的情况下,也不被认为是包含在原始的shape。
如果一个point在shape根据contains(point)方法,那么它必须在返回的Rectangle2D界根据的bounds的contains(point)方法对象。明确地:
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.