public static class Ellipse2D.Double extends Ellipse2D implements Serializable
Doubleクラスは、double精度で指定された楕円を定義します。Ellipse2D.Double, Ellipse2D.Float| 修飾子と型 | フィールド | 説明 | 
|---|---|---|
| double | height | Ellipse2Dの全体の高さです。 | 
| double | width | この Ellipse2Dの全体の幅。 | 
| double | x | この Ellipse2Dの表示枠矩形の左上隅のX座標。 | 
| double | y | この Ellipse2Dの表示枠矩形の左上隅のY座標。 | 
| コンストラクタ | 説明 | 
|---|---|
| Double() | 新しい Ellipse2Dを構築し、位置(0, 0)およびサイズ(0, 0)に初期化します。 | 
| Double(double x, double y, double w, double h) | 指定された座標から Ellipse2Dを構築および初期化します。 | 
| 修飾子と型 | メソッド | 説明 | 
|---|---|---|
| Rectangle2D | getBounds2D() | 高精度で、かつ getBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。 | 
| double | getHeight() | 表示枠矩形の高さを double精度で返します。 | 
| double | getWidth() | 表示枠矩形の幅を double精度で返します。 | 
| double | getX() | 表示枠矩形の左上隅のX座標を double精度で返します。 | 
| double | getY() | 表示枠矩形の左上隅のY座標を double精度で返します。 | 
| 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精度で返します。getX、クラスRectangularShapepublic double getY()
double精度で返します。getY、クラスRectangularShapepublic double getWidth()
double精度で返します。getWidth、クラスRectangularShapepublic double getHeight()
double精度で返します。getHeight、クラスRectangularShapepublic boolean isEmpty()
RectangularShapeが空であるかどうかを判定します。 RectangularShapeが空の場合は、領域はありません。 isEmpty、クラスRectangularShapeRectangularShapeが空である場合はtrue、そうでない場合はfalse。public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Shapeの表示枠矩形の位置とサイズを、指定された矩形値に設定します。setFrame、クラスRectangularShapex - 指定された矩形形状の左上隅のX座標y - 指定された矩形形状の左上隅のY座標w - 指定された矩形形状の幅h - 指定された矩形形状の高さRectangularShape.getFrame()public Rectangle2D getBounds2D()
getBoundsメソッドより正確なShapeのバウンディング・ボックスを返します。 返されたRectangle2Dが、Shapeを囲む最小のバウンディング・ボックスであるという保証はありません。Shapeが、示されたRectangle2D内に完全に含まれているだけです。 戻り値を、倍精度値を使用して寸法を格納するRectangle2Dのインスタンスにすることができるため、このメソッドによって返されたバウンディング・ボックスは通常、getBoundsメソッドによって返されたものより厳密であり、オーバーフローの問題のために失敗することはありません。 
 
 内側の定義によって、shapeの定義する輪郭上の点が、返されたboundsオブジェクトに含まれていると見なされない状況が発生する場合があります。ただし、これは、これらの点が元のshapeにも含まれていないと見なされる場合のみです。
 
 pointがcontains(point)メソッドに従ってshapeの内側にある場合は、boundsのcontains(point)メソッドに従って、返されたRectangle2D境界オブジェクトの内側にある必要があります。 具体的には、次のようになります。 
 
  shape.contains(p)にはbounds.contains(p)が必要
 
 pointがshapeの内側にない場合は、引き続きboundsオブジェクトに含まれている可能性があります。
 
  bounds.contains(p)はshape.contains(p)を示さない
 
getBounds2D、インタフェースShapeShapeの高精度のバウンディング・ボックスであるRectangle2Dのインスタンス。Shape.getBounds() バグまたは機能を送信 
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。 
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved.  Use is subject to license terms.  Documentation Redistribution Policyも参照してください。