- java.lang.Object
-
- java.awt.geom.RectangularShape
-
- java.awt.geom.Ellipse2D
-
- java.awt.geom.Ellipse2D.Double
-
- 实现的所有接口
-
Shape,Serializable,Cloneable
- Enclosing class:
- Ellipse2D
public static class Ellipse2D.Double extends Ellipse2D implements Serializable
Double类定义以double精度指定的椭圆。- 从以下版本开始:
- 1.2
- 另请参见:
- Serialized Form
-
-
嵌套类汇总
-
嵌套类/接口声明在类 java.awt.geom.Ellipse2D
Ellipse2D.Double, Ellipse2D.Float
-
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 Rectangle2DgetBounds2D()返回Shape高精度和更精确的边界框,而不是getBounds方法。doublegetHeight()以double精度返回框架矩形的高度。doublegetWidth()以double精度返回框架矩形的宽度。doublegetX()以double精度返回框架矩形左上角的X坐标。doublegetY()以double精度返回框架矩形左上角的Y坐标。booleanisEmpty()确定RectangularShape是否为空。voidsetFrame(double x, double y, double w, double h)将此Shape的框架矩形的位置和大小设置为指定的矩形值。-
声明方法的类 java.awt.geom.Ellipse2D
contains, contains, equals, getPathIterator, hashCode, intersects
-
声明方法的类 java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
-
-
-
方法详细信息
-
getX
public double getX()
以double精度返回框架矩形左上角的X坐标。- Specified by:
-
getX类RectangularShape - 结果
- 框架矩形左上角的X坐标。
- 从以下版本开始:
- 1.2
-
getY
public double getY()
以double精度返回框架矩形左上角的Y坐标。- Specified by:
-
getY类RectangularShape - 结果
- 框架矩形左上角的Y坐标。
- 从以下版本开始:
- 1.2
-
getWidth
public double getWidth()
以double精度返回框架矩形的宽度。- Specified by:
-
getWidth类,第RectangularShape - 结果
- 框架矩形的宽度。
- 从以下版本开始:
- 1.2
-
getHeight
public double getHeight()
以double精度返回框架矩形的高度。- Specified by:
-
getHeight类RectangularShape - 结果
- 框架矩形的高度。
- 从以下版本开始:
- 1.2
-
isEmpty
public boolean isEmpty()
确定RectangularShape是否为空。 当RectangularShape为空时,它不包含任何区域。- Specified by:
-
isEmpty在类RectangularShape - 结果
-
true如果RectangularShape为空; 否则为false。 - 从以下版本开始:
- 1.2
-
setFrame
public void setFrame(double x, double y, double w, double h)将此Shape的框架矩形的位置和大小设置为指定的矩形值。- Specified by:
-
setFrame类RectangularShape - 参数
-
x- 指定矩形的左上角的X坐标 -
y- 指定矩形的左上角的Y坐标 -
w- 指定矩形的宽度 -
h- 指定矩形的高度 - 从以下版本开始:
- 1.2
- 另请参见:
-
RectangularShape.getFrame()
-
getBounds2D
public Rectangle2D getBounds2D()
返回Shape高精度和更精确的边界框,而不是getBounds方法。 请注意,不保证返回的Rectangle2D是最小的边框包围Shape,只表示Shape完全在指定的范围内Rectangle2D。 此方法返回的边界框通常比getBounds方法返回的边界框更紧密,并且由于溢出问题而永远不会失败,因为返回值可以是使用双精度值来存储尺寸的Rectangle2D的实例。请注意, definition of insideness可能会导致shape定义轮廓上的
shape可能不被视为包含在返回的bounds对象中,但仅限于原始shape未包含这些点的情况。如果
point是内部shape根据contains(point)方法,那么它必须是内部返回Rectangle2D界限根据对象contains(point)所述的方法bounds。 特别:shape.contains(p)需要bounds.contains(p)如果
point不在shape,则它可能仍包含在bounds对象中:bounds.contains(p)并不shape.contains(p)- Specified by:
-
getBounds2D接口Shape - 结果
-
的实例
Rectangle2D那是一个高精度边界框Shape。 - 从以下版本开始:
- 1.2
- 另请参见:
-
Shape.getBounds()
-
-