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, intersects
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public 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.