java.awt
クラス TexturePaint
java.lang.Object
|
+--java.awt.TexturePaint
- すべての実装インタフェース:
- Paint, Transparency
- 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
- the ペイントに使用するテクスチャーを持つ 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
- ユーザ空間からデバイス空間への AffineTransform
hints
- パターンの最終的な描画方法を指定するために使用できる RenderingHints
オブジェクト- 戻り値:
- カラーパターンの生成に使用する
PaintContext
- 関連項目:
PaintContext
getTransparency
public int getTransparency()
- この
TexturePaint
の透明度モードを返します。
- 定義:
- インタフェース
Transparency
内の getTransparency
- 戻り値:
- この
TexturePaint
の透明度モード (int 値) - 関連項目:
Transparency
バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。 Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.