public final class ImageGraphicAttribute extends GraphicAttribute
ImageGraphicAttributeクラスは、TextLayoutにイメージをレンダリングするGraphicAttributeの実装です。GraphicAttributeBOTTOM_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を構築します。 |
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
void |
draw(Graphics2D graphics, float x, float y) |
この
GraphicAttributeを指定された位置にレンダリングします。 |
boolean |
equals(ImageGraphicAttribute rhs) |
この
ImageGraphicAttributeを指定されたImageGraphicAttributeと比較します。 |
boolean |
equals(Object rhs) |
この
ImageGraphicAttributeを指定されたObjectと比較します。 |
float |
getAdvance() |
この
ImageGraphicAttributeの有効幅を返します。 |
float |
getAscent() |
この
ImageGraphicAttributeのアセントを返します。 |
Rectangle2D |
getBounds() |
この
ImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。 |
float |
getDescent() |
この
ImageGraphicAttributeのディセントを返します。 |
int |
hashCode() |
この
ImageGraphicAttributeのハッシュ・コードを返します。 |
getAlignment, getJustificationInfo, getOutlinepublic ImageGraphicAttribute(Image image, int alignment)
ImageからImageGraphicAttributeを構築します。 原点は(0, 0)です。 image - このImageGraphicAttributeによってレンダリングされるImage。 このオブジェクトはimageに対する参照を保持します。 alignment - ImageGraphicAttributeに対する配置方法の1つ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座標。public float getAscent()
ImageGraphicAttributeのアセントを返します。 ImageGraphicAttributeのアセントとは、イメージの上端から原点までの距離のことです。 getAscent、クラスGraphicAttributeImageGraphicAttributeのアセント。GraphicAttribute.getBounds()public float getDescent()
ImageGraphicAttributeのディセントを返します。 ImageGraphicAttributeのディセントとは、原点からイメージの下端までの距離のことです。 getDescent、クラスGraphicAttributeImageGraphicAttributeのディセント。GraphicAttribute.getBounds()public float getAdvance()
ImageGraphicAttributeの有効幅を返します。 ImageGraphicAttributeの有効幅とは、原点からイメージの右端までの距離のことです。 getAdvance、クラスGraphicAttributeImageGraphicAttributeの有効幅。GraphicAttribute.getBounds()public Rectangle2D getBounds()
ImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2Dを返します。これは、レンダリング位置を基準にして示されます。 グラフィックは、原点、アセント、ディセント、有効幅を超えてレンダリングできますが、その場合はグラフィックをレンダリングする位置をこのメソッドの実装で示す必要があります。 getBounds、クラスGraphicAttributeImageGraphicAttributeによってレンダリングされる全ビットを囲むRectangle2D。public void draw(Graphics2D graphics, float x, float y)
GraphicAttributeを指定された位置にレンダリングします。draw、クラスGraphicAttributegraphics - グラフィックのレンダリング先のGraphics2Dx - グラフィックがレンダリングされるユーザー空間X座標y - グラフィックがレンダリングされるユーザー空間Y座標public int hashCode()
ImageGraphicAttributeのハッシュ・コードを返します。hashCode、クラスObjectObject.equals(java.lang.Object), System.identityHashCode(java.lang.Object)public boolean equals(Object rhs)
ImageGraphicAttributeを指定されたObjectと比較します。equals、クラスObjectrhs - 等しいかどうかを比較するObjectImageGraphicAttributeがrhsの場合はtrue、それ以外の場合はfalse。Object.hashCode()、HashMappublic boolean equals(ImageGraphicAttribute rhs)
ImageGraphicAttributeを指定されたImageGraphicAttributeと比較します。rhs - 等しいかどうかを比較するImageGraphicAttributeImageGraphicAttributeがrhsの場合はtrue、それ以外の場合はfalse。 バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。