|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.awt.font.GraphicAttribute
java.awt.font.ImageGraphicAttribute
public final class ImageGraphicAttribute
ImageGraphicAttribute 類別是在 TextLayout 中繪製圖像的 GraphicAttribute 實作。
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。 |
|
| 方法摘要 | |
|---|---|
void |
draw(Graphics2D graphics,
float x,
float y)
在指定的位置呈現此 GraphicAttribute。 |
boolean |
equals(ImageGraphicAttribute rhs)
比較此 ImageGraphicAttribute 與指定的 ImageGraphicAttribute。 |
boolean |
equals(Object rhs)
比較此 ImageGraphicAttribute 與指定的 Object。 |
float |
getAdvance()
返回此 ImageGraphicAttribute 的 advance。 |
float |
getAscent()
返回此 ImageGraphicAttribute 的 ascent。 |
Rectangle2D |
getBounds()
返回一個 Rectangle2D,它封裝此 ImageGraphicAttribute 相對於呈現位置呈現的所有位。 |
float |
getDescent()
返回此 ImageGraphicAttribute 的 descent。 |
int |
hashCode()
返回此 ImageGraphicAttribute 的雜湊碼。 |
| 從類別 java.awt.font.GraphicAttribute 繼承的方法 |
|---|
getAlignment, getJustificationInfo, getOutline |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public ImageGraphicAttribute(Image image,
int alignment)
Image 建構一個 ImageGraphicAttribute。原點位於 (0, 0)。
image - 此 ImageGraphicAttribute 呈現的 Image。此物件保持對 image 的參考。alignment - 此 ImageGraphicAttribute 的一種對齊方式。
public ImageGraphicAttribute(Image image,
int alignment,
float originX,
float originY)
Image 建構一個 ImageGraphicAttribute。Image 中的點 (originX, originY) 出現在文本中 ImageGraphicAttribute 的原點。
image - 此 ImageGraphicAttribute 呈現的 Image。此物件保持對 image 的參考。alignment - 此 ImageGraphicAttribute 的一種對齊方式originX - Image 中點的 X 坐標,該點顯示在文本行中 ImageGraphicAttribute 的原點位置上。originY - Image 中點的 Y 坐標,該點顯示在文本行中 ImageGraphicAttribute 的原點位置上。| 方法詳細資訊 |
|---|
public float getAscent()
ImageGraphicAttribute 的 ascent。ImageGraphicAttribute 的 ascent 是從該圖像的頂端到原點的距離。
GraphicAttribute 中的 getAscentImageGraphicAttribute 的 ascent。GraphicAttribute.getBounds()public float getDescent()
ImageGraphicAttribute 的 descent。ImageGraphicAttribute 的 descent 是從原點到該圖像底部的距離。
GraphicAttribute 中的 getDescentImageGraphicAttribute 的 descent。GraphicAttribute.getBounds()public float getAdvance()
ImageGraphicAttribute 的 advance。ImageGraphicAttribute 的 advance 是從原點到該圖像右邊緣的距離。
GraphicAttribute 中的 getAdvanceImageGraphicAttribute 的 advance。GraphicAttribute.getBounds()public Rectangle2D getBounds()
Rectangle2D,它封裝此 ImageGraphicAttribute 相對於呈現位置呈現的所有位。圖形可以在其原點、ascent、descent 和 advance 之外呈現;但如果這樣做,此方法的實作必須指示呈現該圖形的位置。
GraphicAttribute 中的 getBoundsImageGraphicAttribute 呈現的所有位的 Rectangle2D。
public void draw(Graphics2D graphics,
float x,
float y)
GraphicAttribute。
GraphicAttribute 中的 drawgraphics - 將該圖形呈現到的 Graphics2Dpublic int hashCode()
ImageGraphicAttribute 的雜湊碼。
Object 中的 hashCodeObject.equals(java.lang.Object),
Hashtablepublic boolean equals(Object rhs)
ImageGraphicAttribute 與指定的 Object。
Object 中的 equalsrhs - 要測試相等性的 Object
ImageGraphicAttribute 與 rhs 相等,則返回 true;否則返回 false。Object.hashCode(),
Hashtablepublic boolean equals(ImageGraphicAttribute rhs)
ImageGraphicAttribute 與指定的 ImageGraphicAttribute。
rhs - 要測試相等性的 ImageGraphicAttribute
ImageGraphicAttribute 與 rhs 相等,則返回 true;否則返回 false。
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。