|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.awt.TexturePaint
public class TexturePaint
TexturePaint 類別提供一種用被指定為 BufferedImage 的紋理填充 Shape 的方式。因為 BufferedImage 資料由 TexturePaint 物件複製,所以 BufferedImage 物件的大小應該小一些。在建構時,紋理定位在使用者空間中指定的 Rectangle2D 的左上角。在理論上,計算紋理在設備空間中的位置的方式是,在使用者空間中的所有方向上無限制地複製指定 Rectangle2D,然後將 BufferedImage 映射到各個複製的 Rectangle2D。
Paint,
Graphics2D.setPaint(java.awt.Paint)| 欄位摘要 |
|---|
| 從介面 java.awt.Transparency 繼承的欄位 |
|---|
BITMASK, OPAQUE, TRANSLUCENT |
| 建構子摘要 | |
|---|---|
TexturePaint(BufferedImage txtr,
Rectangle2D anchor)
建構 TexturePaint 物件。 |
|
| 方法摘要 | |
|---|---|
PaintContext |
createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
創建並返回用於產生顏色網要的上下文。 |
Rectangle2D |
getAnchorRect()
返回定位紋理圖像並設置其大小的固定矩形的副本。 |
BufferedImage |
getImage()
返回用於填充形狀的 BufferedImage 紋理。 |
int |
getTransparency()
返回此 TexturePaint 的透明網要。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public TexturePaint(BufferedImage txtr,
Rectangle2D anchor)
TexturePaint 物件。
txtr - 具有用於繪製的紋理的 BufferedImage 物件anchor - 使用者空間中用於定位和複製紋理的 Rectangle2D| 方法詳細資訊 |
|---|
public BufferedImage getImage()
BufferedImage 紋理。
BufferedImage。public Rectangle2D getAnchorRect()
TexturePaint 固定並設置其大小的 Rectangle2D。
public PaintContext createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
Paint 中的 createContextcm - 接收 Paint 資料的 ColorModel。此參數只用作一個提示。deviceBounds - 要呈現的圖形原語的設備空間邊界框userBounds - 要呈現的圖形原語的使用者空間邊界框xform - 從使用者空間到設備空間的 AffineTransformhints - 可用於指定網要的最終呈現方式的 RenderingHints 物件
PaintContext。PaintContextpublic int getTransparency()
TexturePaint 的透明網要。
Transparency 中的 getTransparencyTexturePaint 的透明網要。Transparency
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。