public static class RoundRectangle2D.Float extends RoundRectangle2D implements Serializable
Float
类定义了一个圆角矩形都指定
float
坐标。
RoundRectangle2D.Double, RoundRectangle2D.Float
Modifier and Type | Field and Description |
---|---|
float |
archeight
弧的高度,轮从角落。
|
float |
arcwidth
弧的宽度,轮从角落。
|
float |
height
这
RoundRectangle2D 高度。
|
float |
width
这
RoundRectangle2D 宽度。
|
float |
x
这
RoundRectangle2D X坐标。
|
float |
y
这
RoundRectangle2D Y坐标。
|
Constructor and Description |
---|
Float()
构建了一种新的
RoundRectangle2D ,初始化位置(0, 0),大小(0, 0),和0角圆弧半径。
|
Float(float x, float y, float w, float h, float arcw, float arch)
构造和初始化一个
RoundRectangle2D 从指定的
float 坐标。
|
Modifier and Type | Method and Description |
---|---|
double |
getArcHeight()
获取圆弧的弧线的高度。
|
double |
getArcWidth()
获取圆弧的宽度,圆弧的宽度为。
|
Rectangle2D |
getBounds2D()
返回一个高的精度和更精确的包围盒的
Shape 比
getBounds 方法。
|
double |
getHeight()
返回框架矩形
double 精度高。
|
double |
getWidth()
返回框架矩形的宽度
double 精度。
|
double |
getX()
返回的
double 精度框架矩形左上角的x坐标。
|
double |
getY()
返回的
double 精度框架矩形左上角的Y坐标。
|
boolean |
isEmpty()
确定
RectangularShape 是空的。
|
void |
setRoundRect(double x, double y, double w, double h, double arcw, double arch)
设置的位置、大小和圆角半径的这
RoundRectangle2D 到指定的
double 值。
|
void |
setRoundRect(float x, float y, float w, float h, float arcw, float arch)
设置的位置、大小和圆角半径的这
RoundRectangle2D 到指定的
float 值。
|
void |
setRoundRect(RoundRectangle2D rr)
设置为指定的
RoundRectangle2D 同这
RoundRectangle2D 。
|
contains, contains, equals, getPathIterator, hashCode, intersects, setFrame
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public float x
RoundRectangle2D
X坐标。
public float y
RoundRectangle2D
Y坐标。
public float width
RoundRectangle2D
宽度。
public float height
RoundRectangle2D
高度。
public float arcwidth
public float archeight
public Float()
RoundRectangle2D
,初始化位置(0, 0),大小(0, 0),和0角圆弧半径。
public Float(float x, float y, float w, float h, float arcw, float arch)
RoundRectangle2D
从指定的
float
坐标。
x
-新建
RoundRectangle2D
X坐标
y
-新建
RoundRectangle2D
Y坐标
w
的宽度,设置新建
RoundRectangle2D
h
的高度,设置新建
RoundRectangle2D
arcw
-弧用于新建
RoundRectangle2D
圆滑转角的宽度
arch
-弧用于新建
RoundRectangle2D
圆滑转角的高度
public double getX()
double
精度框架矩形左上角的x坐标。
getX
方法重写,继承类
RectangularShape
public double getY()
double
精度框架矩形左上角的Y坐标。
getY
方法重写,继承类
RectangularShape
public double getWidth()
double
精度。
getWidth
方法重写,继承类
RectangularShape
public double getHeight()
double
精度高。
getHeight
方法重写,继承类
RectangularShape
public double getArcWidth()
getArcWidth
方法重写,继承类
RoundRectangle2D
RoundRectangle2D
角落。
public double getArcHeight()
getArcHeight
方法重写,继承类
RoundRectangle2D
RoundRectangle2D
角落。
public boolean isEmpty()
RectangularShape
是空的。当
RectangularShape
是空的,它包含的任何地区。
isEmpty
方法重写,继承类
RectangularShape
true
如果
RectangularShape
是空的;
false
否则。
public void setRoundRect(float x, float y, float w, float h, float arcw, float arch)
RoundRectangle2D
到指定的
float
值。
x
- X坐标来设置此
RoundRectangle2D
位置
y
- Y坐标来设置此
RoundRectangle2D
位置
w
的宽度来设置这个
RoundRectangle2D
h
的高度来设置这个
RoundRectangle2D
arcw
的宽度来设置此
RoundRectangle2D
弧
arch
的高度来设置此
RoundRectangle2D
弧
public void setRoundRect(double x, double y, double w, double h, double arcw, double arch)
RoundRectangle2D
到指定的
double
值。
setRoundRect
方法重写,继承类
RoundRectangle2D
x
- X坐标来设置此
RoundRectangle2D
位置
y
- Y坐标来设置此
RoundRectangle2D
位置
w
的宽度来设置这个
RoundRectangle2D
h
的高度来设置这个
RoundRectangle2D
arcw
的宽度来设置此
RoundRectangle2D
弧
arch
的高度来设置此
RoundRectangle2D
弧
public void setRoundRect(RoundRectangle2D rr)
RoundRectangle2D
同这
RoundRectangle2D
。
setRoundRect
方法重写,继承类
RoundRectangle2D
rr
-指定
RoundRectangle2D
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.