|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
public interface PaintContext
PaintContext 介面定義了經過封裝和優化的環境,使用此環境可以產生設備空間中的顏色網要,此網要用於在 Graphics2D 上進行填充操作或筆劃操作。PaintContext 採用與 ColorModel 相關聯的 Raster 的方式提供 Graphics2D 操作所必需的顏色。PaintContext 保持著進行特殊著色操作的狀態。在多執行緒環境中,針對單個 Paint 物件可同時有多個上下文。
Paint| 方法摘要 | |
|---|---|
void |
dispose()
釋放為操作分派的資源。 |
ColorModel |
getColorModel()
返回輸出的 ColorModel。 |
Raster |
getRaster(int x,
int y,
int w,
int h)
返回包含為圖形操作產生的顏色的 Raster。 |
| 方法詳細資訊 |
|---|
void dispose()
ColorModel getColorModel()
ColorModel。注意,此 ColorModel 可能與在 Paint 的 createContext 方法中指定的提示是不同的。不是所有的 PaintContext 物件都能夠產生任意 ColorModel 的顏色網要。
ColorModel。
Raster getRaster(int x,
int y,
int w,
int h)
Raster。
x - 為其產生顏色的設備空間區域的 x 坐標。y - 為其產生顏色的設備空間區域的 y 坐標。w - 設備空間區域的寬度h - 設備空間區域的高度
Raster,它表示指定的矩形區域,該區域包含為圖形操作產生的顏色。
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。