java.lang.Object
java.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute
public final class ImageGraphicAttribute extends GraphicAttribute
ImageGraphicAttributeクラスは、TextLayoutにイメージをレンダリングするGraphicAttributeの実装です。- 関連項目:
-
フィールドのサマリー
クラスjava.awt.font.GraphicAttributeで宣言されたフィールド
BOTTOM_ALIGNMENT, CENTER_BASELINE, HANGING_BASELINE, ROMAN_BASELINE, TOP_ALIGNMENT -
コンストラクタのサマリー
コンストラクタコンストラクタ説明ImageGraphicAttribute(Image image, int alignment) 指定されたImageからImageGraphicAttributeを構築します。ImageGraphicAttribute(Image image, int alignment, float originX, float originY) 指定されたImageからImageGraphicAttributeを構築します。 -
メソッドのサマリー
修飾子と型メソッド説明voiddraw(Graphics2D graphics, float x, float y) このGraphicAttributeを指定された位置にレンダリングします。booleanこのImageGraphicAttributeを指定されたImageGraphicAttributeと比較します。booleanこのImageGraphicAttributeを指定されたObjectと比較します。floatこのImageGraphicAttributeの有効幅を返します。floatこのImageGraphicAttributeのアセントを返します。このImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。floatこのImageGraphicAttributeのディセントを返します。inthashCode()このImageGraphicAttributeのハッシュ・コードを返します。クラスjava.awt.font.GraphicAttributeで宣言されたメソッド
getAlignment, getJustificationInfo, getOutline
-
コンストラクタの詳細
-
ImageGraphicAttribute
-
ImageGraphicAttribute
public ImageGraphicAttribute(Image image, int alignment, float originX, float originY) 指定されたImageからImageGraphicAttributeを構築します。Image内の点(originX,originY)は、テキスト内のImageGraphicAttributeの原点に現われます。- パラメータ:
image- このImageGraphicAttributeによってレンダリングされるImage。 このオブジェクトはimageに対する参照を保持します。alignment-ImageGraphicAttributeに対する配置方法の1つoriginX- テキスト行内のImageGraphicAttributeの原点に現れる、Image内の点のX座標。originY- テキスト行内のImageGraphicAttributeの原点に現れる、Image内の点のY座標。
-
-
メソッドの詳細
-
getAscent
public float getAscent()このImageGraphicAttributeのアセントを返します。ImageGraphicAttributeのアセントとは、イメージの上端から原点までの距離のことです。- 定義:
getAscent、クラスGraphicAttribute- 戻り値:
- この
ImageGraphicAttributeのアセント。 - 関連項目:
-
getDescent
public float getDescent()このImageGraphicAttributeのディセントを返します。ImageGraphicAttributeのディセントとは、原点からイメージの下端までの距離のことです。- 定義:
getDescent、クラスGraphicAttribute- 戻り値:
- この
ImageGraphicAttributeのディセント。 - 関連項目:
-
getAdvance
public float getAdvance()このImageGraphicAttributeの有効幅を返します。ImageGraphicAttributeの有効幅とは、原点からイメージの右端までの距離のことです。- 定義:
getAdvance、クラスGraphicAttribute- 戻り値:
- この
ImageGraphicAttributeの有効幅。 - 関連項目:
-
getBounds
public Rectangle2D getBounds()このImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。 グラフィックは、原点、アセント、ディセント、有効幅を超えてレンダリングできますが、その場合はグラフィックをレンダリングする位置をこのメソッドの実装で示す必要があります。- オーバーライド:
getBounds、クラスGraphicAttribute- 戻り値:
- この
ImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2D。
-
draw
public void draw(Graphics2D graphics, float x, float y) このGraphicAttributeを指定された位置にレンダリングします。- 定義:
draw、クラスGraphicAttribute- パラメータ:
graphics- グラフィックのレンダリング先のGraphics2Dx- グラフィックがレンダリングされるユーザー空間X座標y- グラフィックがレンダリングされるユーザー空間Y座標
-
hashCode
-
equals
-
equals
public boolean equals(ImageGraphicAttribute rhs) このImageGraphicAttributeを指定されたImageGraphicAttributeと比較します。- パラメータ:
rhs- 等しいかどうかを比較するImageGraphicAttribute- 戻り値:
- この
ImageGraphicAttributeがrhsの場合はtrue、それ以外の場合はfalse。
-