|
Java プラットフォーム 1.2 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object | +--java.awt.GraphicsConfiguration
GraphicsConfiguration クラスは、プリンタやモニターなどのグラフィックスデスティネーションの特性を記述します。1 つのグラフィックスデバイスに、多くの GraphicsConfiguration オブジェクトを関連付けることができます。たとえば、X11 ウィンドウシステムでは、各画像はそれぞれ異なる GraphicsConfiguration です。PC と Macintosh では、画面解像度とカラー解像度の組み合わせごとに、GraphicsConfiguration が異なります。
GraphicsEnvironment,
GraphicsDevice| コンストラクタの概要 | |
protected |
GraphicsConfiguration()
インスタンスを直接生成できない抽象クラスです。 |
| メソッドの概要 | |
abstract BufferedImage |
createCompatibleImage(int width,
int height)
この GraphicsConfiguration と互換性のあるデータレイアウトとカラーモデルを持つ BufferedImage を返します。 |
abstract BufferedImage |
createCompatibleImage(int width,
int height,
int transparency)
指定された透明度をサポートし、この GraphicsConfiguration と互換性のあるデータレイアウトおよびカラーモデルを持つ BufferedImage を返します。 |
abstract ColorModel |
getColorModel()
この GraphicsConfiguration に関連付けられた ColorModel を返します。 |
abstract ColorModel |
getColorModel(int transparency)
指定された透明度をサポートし、この GraphicsConfiguration に関連付けられた ColorModel を返します。 |
abstract AffineTransform |
getDefaultTransform()
この GraphicsConfiguration のデフォルトの AffineTransform を返します。 |
abstract GraphicsDevice |
getDevice()
この GraphicsConfiguration に関連付けられた GraphicsDevice を返します。 |
abstract AffineTransform |
getNormalizingTransform()
ユーザ空間の 72 単位がデバイス空間の 1 インチに相当するように、 GraphicsConfiguration のデフォルト AffineTransform と連結できる AffineTransform を返します。
|
| クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| コンストラクタの詳細 |
protected GraphicsConfiguration()
GraphicsDevice.getConfigurations(),
GraphicsDevice.getDefaultConfiguration(),
GraphicsDevice.getBestConfiguration(java.awt.GraphicsConfigTemplate),
Graphics2D.getDeviceConfiguration()| メソッドの詳細 |
public abstract GraphicsDevice getDevice()
GraphicsConfiguration に関連付けられた GraphicsDevice を返します。GraphicsConfiguration に関連付けられている GraphicsDevice オブジェクト
public abstract BufferedImage createCompatibleImage(int width,
int height)
GraphicsConfiguration と互換性のあるデータレイアウトとカラーモデルを持つ BufferedImage を返します。このメソッドは、デバイスをメモリマッピングすることとは無関係です。返される BufferedImage は、このネイティブのデバイス構成にもっとも近いレイアウトおよびカラーモデルを持っているので、このデバイスに最適にブリットできます。width - 返される BufferedImage の幅height - 返される BufferedImage の高さGraphicsConfiguration と互換性のある BufferedImage
public abstract BufferedImage createCompatibleImage(int width,
int height,
int transparency)
GraphicsConfiguration と互換性のあるデータレイアウトおよびカラーモデルを持つ BufferedImage を返します。このメソッドは、デバイスをメモリマッピングすることとは無関係です。返される BufferedImage は、この GraphicsConfiguration を持つデバイスに最適にブリットできるレイアウトおよびカラーモデルを持ちます。width - 返される BufferedImage の幅height - 返される BufferedImage の高さtransparency - 透明度モードGraphicsConfiguration と互換性があり、指定された透明度をサポートする BufferedImageTransparency.OPAQUE,
Transparency.BITMASK,
Transparency.TRANSLUCENTpublic abstract ColorModel getColorModel()
GraphicsConfiguration に関連付けられた ColorModel を返します。GraphicsConfiguration に関連付けられている ColorModel オブジェクトpublic abstract ColorModel getColorModel(int transparency)
GraphicsConfiguration に関連付けられた ColorModel を返します。transparency - 透明度モードGraphicsConfiguration に関連付けられている ColorModel オブジェクトpublic abstract AffineTransform getDefaultTransform()
GraphicsConfiguration のデフォルトの AffineTransform を返します。この AffineTransform は通常、最標準の画面に対する恒等変換です。デフォルトの AffineTransform は、72 ユーザ空間座標単位がデバイス空間のおよそ 1 インチに対応するようにデバイスに座標をマッピングします。正規化変換を使用すると、このマッピングをより正確にすることができます。画面デバイスとプリンタデバイスのデフォルトの AffineTransform で定義されている座標空間の座標は、デバイスのターゲット領域の左上隅に原点を持ち、X 座標は右方向に、Y 座標は下方向に値が増加します。createCompatibleImage で作成されないイメージバッファなど、デバイスに関連付けられていないイメージバッファでは、この AffineTransform は恒等変換になります。GraphicsConfiguration のデフォルトの AffineTransformpublic abstract AffineTransform getNormalizingTransform()
GraphicsConfiguration のデフォルト AffineTransform と連結できる AffineTransform を返します。
特定の Graphics2D では、次の擬似コードを使って変換をリセットし、このようなマッピングを作成できます。
GraphicsConfiguration gc = g.getGraphicsConfiguration();
g.setTransform(gc.getDefaultTransform());
g.transform(gc.getNormalizingTransform());
ただし、この AffineTransform は場合によって、たとえばプリンタ出力やメタファイル出力の場合に恒等変換になり、その正確さは基礎のシステムによって指定される情報と同じ程度になります。createCompatibleImage によって作成されないイメージバッファなど、デバイスに関連付けられていないイメージバッファでは、有効な距離測定法がないために、この AffineTransform は恒等変換になります。AffineTransform に連結する AffineTransform
|
Java プラットフォーム 1.2 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||