public static class Ellipse2D.Double extends Ellipse2D implements Serializable
Double类定义了一个在
double精度指定椭圆。
Ellipse2D.Double, Ellipse2D.Float| Modifier and Type | Field and Description |
|---|---|
double |
height
Ellipse2D的整体高度。
|
double |
width
这
Ellipse2D整体宽度。
|
double |
x
这对
Ellipse2D框架矩形左上角的x坐标。
|
double |
y
这对
Ellipse2D框架矩形的左上角的Y坐标。
|
| Constructor and Description |
|---|
Double()
构建了一种新的
Ellipse2D,初始化位置(0, 0)和大小(0, 0)。
|
Double(double x, double y, double w, double h)
构造和初始化从指定的坐标
Ellipse2D。
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds2D()
返回一个高的精度和更精确的包围盒的
Shape比
getBounds方法。
|
double |
getHeight()
返回框架矩形
double精度高。
|
double |
getWidth()
返回框架矩形的宽度
double精度。
|
double |
getX()
返回的
double精度框架矩形左上角的x坐标。
|
double |
getY()
返回的
double精度框架矩形左上角的Y坐标。
|
boolean |
isEmpty()
确定
RectangularShape是空的。
|
void |
setFrame(double x, double y, double w, double h)
设置指定的矩形值位置的
Shape框架矩形尺寸。
|
contains, contains, equals, getPathIterator, hashCode, intersectsclone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalpublic double x
Ellipse2D框架矩形左上角的x坐标。
public double y
Ellipse2D框架矩形的左上角的Y坐标。
public double width
Ellipse2D整体宽度。
public double height
Ellipse2D的整体高度。
public Double()
Ellipse2D,初始化位置(0, 0)和大小(0, 0)。
public Double(double x,
double y,
double w,
double h)
Ellipse2D。
x -帧的矩形左上角的x坐标
y -帧的矩形的左上角的Y坐标
w -框架矩形的宽度
h -框架矩形的高度
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 boolean isEmpty()
RectangularShape是空的。当
RectangularShape是空的,它包含的任何地区。
isEmpty 方法重写,继承类
RectangularShape
true如果
RectangularShape是空的;
false否则。
public void setFrame(double x,
double y,
double w,
double h)
Shape框架矩形尺寸。
setFrame 方法重写,继承类
RectangularShape
x -指定的矩形的左上角的x坐标
y -指定的矩形的左上角的Y坐标
w -指定矩形的宽度
h -指定矩形的高度
RectangularShape.getFrame()
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.