java.awt
クラス TexturePaint
java.lang.Object
|
+--java.awt.TexturePaint
- public class TexturePaint
- extends Object
- implements Paint
TexturePaint クラスは、BufferedImage として指定されるテクスチャーで Shape を塗りつぶす手段を提供します。TexturePaint オブジェクトによって BufferedImage データがコピーされるので、BufferedImage オブジェクトのサイズは小さくしておく必要があります。テクスチャーは、作成時にユーザ空間で指定される Rectangle2D の左上隅にアンカー設定されます。テクスチャーのデバイス空間での位置は、指定された Rectangle2D を、ユーザ空間ですべての方向に無限に複製し、複製された各 Rectangle2D に BufferedImage をマッピングすることにより、計算されます。
- 関連項目:
Paint,
Graphics2D.setPaint(java.awt.Paint)
| クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TexturePaint
public TexturePaint(BufferedImage txtr,
Rectangle2D anchor)
TexturePaint オブジェクトを構築します。
- パラメータ:
txtr - 塗りつぶしに使用するテクスチャーを持つ BufferedImage オブジェクトanchor - テクスチャーのアンカー設定および複製に使用されるユーザ空間内の Rectangle2D
getImage
public BufferedImage getImage()
- 図形を塗りつぶすために使用される
BufferedImage テクスチャーを返します。
- 戻り値:
BufferedImage
getAnchorRect
public Rectangle2D getAnchorRect()
- テクスチャーイメージの位置とサイズを指定するアンカー矩形のコピーを返します。
- 戻り値:
- この
TexturePaint のアンカー設定およびサイズ指定を行うために使用される Rectangle2D
createContext
public PaintContext createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
- カラーパターンを生成するために使用されるコンテキストを作成して返します。
- 定義:
- インタフェース Paint 内の createContext
- パラメータ:
cm - Paint データを受け取る ColorModel。これは単にヒントとして使用されるdeviceBounds - 描画されるグラフィックスプリミティブのデバイス空間でのバウンディングボックスuserBounds - 描画されるグラフィックスプリミティブのユーザ空間でのバウンディングボックスxform - ユーザ空間からデバイス空間への AffineTransformhints - パターンの最終的な描画方法を指定するために使用できる RenderingHints オブジェクト- 戻り値:
- カラーパターン生成のための
PaintContext - 関連項目:
PaintContext
getTransparency
public int getTransparency()
- この
TexturePaint の透明度モードを返します。
- 戻り値:
- この
TexturePaint の透明度モード (int 値) - 関連項目:
Transparency
バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.