モジュール java.desktop
パッケージ java.awt.font

クラスShapeGraphicAttribute

    • フィールドの詳細

      • STROKE

        public static final boolean STROKE
        1ピクセル幅のストロークでレンダリングする必要がある形状を示すキーです。
        関連項目:
        定数フィールド値
      • FILL

        public static final boolean FILL
        塗りつぶす必要がある形状を示すキーです。
        関連項目:
        定数フィールド値
    • コンストラクタの詳細

      • ShapeGraphicAttribute

        public ShapeGraphicAttribute​(Shape shape,
                                     int alignment,
                                     boolean stroke)
        指定されたShapeShapeGraphicAttributeを構築します。
        パラメータ:
        shape - レンダリングするShape Shapeは、ホストTextLayoutのこのShapeGraphicAttributeの原点を原点にしてレンダリングされる。 このオブジェクトはshapeへの参照を保持する。
        alignment - このShapeGraphicAttributeの配置方法の1つ。
        stroke - Shapeをストロークでレンダリングする必要がある場合はtrueShapeを塗りつぶす必要がある場合はfalse
    • メソッドの詳細

      • getAscent

        public float getAscent()
        このShapeGraphicAttributeのアセントを返します。 ShapeGraphicAttributeのアセントはそのShapeの原点から、そのShapeの境界の最上部までの正の距離です。
        定義:
        getAscent、クラス: GraphicAttribute
        戻り値:
        このShapeGraphicAttributeのアセント。
        関連項目:
        GraphicAttribute.getBounds()
      • getDescent

        public float getDescent()
        このShapeGraphicAttributeのディセントを返します。 ShapeGraphicAttributeのディセントとは、そのShapeの原点から、そのShapeの境界の最下部までの距離です。
        定義:
        getDescent、クラス: GraphicAttribute
        戻り値:
        このShapeGraphicAttributeのディセント。
        関連項目:
        GraphicAttribute.getBounds()
      • getAdvance

        public float getAdvance()
        このShapeGraphicAttributeの有効幅を返します。 ShapeGraphicAttributeの有効幅とは、そのShapeの原点から、そのShapeの境界の右端までの距離です。
        定義:
        getAdvance、クラス: GraphicAttribute
        戻り値:
        このShapeGraphicAttributeの有効幅。
        関連項目:
        GraphicAttribute.getBounds()
      • getBounds

        public Rectangle2D getBounds()
        このShapeGraphicAttributeによってレンダリングされる全ビットを囲む、Rectangle2Dを返します。これは、レンダリング位置を基準にして示されます。 グラフィックは、原点、アセント、ディセント、有効幅を超えてレンダリングできますが、その場合はグラフィックをレンダリングする位置をこのメソッドの実装で示す必要があります。
        オーバーライド:
        getBounds、クラス: GraphicAttribute
        戻り値:
        このShapeGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2D
      • getOutline

        public Shape getOutline​(AffineTransform tx)
        このShapeGraphicAttributeによってレンダリングされる領域を表すShapeを返します。 これはTextLayoutがテキストの輪郭を返すように要求されたときに使用されます。 (変換されていない)形状は、getBoundsによって返される矩形境界の内側に収まっている必要があります。
        オーバーライド:
        getOutline、クラス: GraphicAttribute
        パラメータ:
        tx - このShapeGraphicAttributeに適用するオプションのAffineTransform nullを指定できる。
        戻り値:
        ストローク・レンダリングや塗りつぶしに適した、このGraphicAttributeを表すShape
        導入されたバージョン:
        1.6
      • equals

        public boolean equals​(Object rhs)
        このShapeGraphicAttributeを指定されたObjectと比較します。
        オーバーライド:
        equals 、クラス:  Object
        パラメータ:
        rhs - 等しいかどうかを比較するObject
        戻り値:
        このShapeGraphicAttributerhsの場合はtrue、それ以外の場合はfalse
        関連項目:
        Object.hashCode()HashMap
      • equals

        public boolean equals​(ShapeGraphicAttribute rhs)
        このShapeGraphicAttributeを指定されたShapeGraphicAttributeと比較します。
        パラメータ:
        rhs - 等しいかどうかを比較するShapeGraphicAttribute
        戻り値:
        このShapeGraphicAttributerhsの場合はtrue、それ以外の場合はfalse