|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.TexturePaint
TexturePaint
クラスは、BufferedImage
として指定されるテクスチャーで Shape
を塗りつぶす手段を提供します。TexturePaint
オブジェクトによって BufferedImage
データがコピーされるので、BufferedImage
オブジェクトのサイズは小さくしておく必要があります。テクスチャーは、作成時にユーザ空間で指定される Rectangle2D
の左上隅にアンカー設定されます。テクスチャーのデバイス空間での位置は、指定された Rectangle2D
を、ユーザ空間ですべての方向に無限に複製し、複製された各 Rectangle2D
に BufferedImage
をマッピングすることにより、計算されます。
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
内の createContext
cm
- Paint
データを受け取る ColorModel
。これは単にヒントとして使用されるdeviceBounds
- 描画されるグラフィックスプリミティブのデバイス空間でのバウンディングボックスuserBounds
- 描画されるグラフィックスプリミティブのユーザ空間でのバウンディングボックスxform
- ユーザ空間からデバイス空間への AffineTransform
hints
- パターンの最終的な描画方法を指定するために使用できる RenderingHints
オブジェクト
PaintContext
PaintContext
public int getTransparency()
TexturePaint
の透明度モードを返します。
Transparency
内の getTransparency
TexturePaint
の透明度モード (int 値)Transparency
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.