|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.image.Raster
ピクセルで構成される矩形配列を表現するクラスです。Raster は、サンプル値が格納されている DataBuffer と、指定されたサンプル値を DataBuffer から探し出す方法が記述されている SampleModel をカプセル化します。
Raster は、平面上の特定の矩形領域 (必ずしも (0, 0) を含んでいなくてもよい) を占めるピクセル値を定義します。この矩形は、Raster の境界の矩形といい、getBounds メソッドにより取得され、minX、minY、width、height の値によって定義されます。minX と minY の値は、Raster の左上隅の座標を定義します。境界の矩形外のピクセルを参照すると、例外がスローされたり、DataBuffer に関連している Raster の意図しない要素が参照されることになります。Raster を使用するときは、このような範囲外のアクセスは行わないようにしてください。
SampleModel は、Raster のサンプルが DataBuffer のプリミティブ配列要素に格納される方法を記述します。サンプルは、PixelInterleavedSampleModel や BandedSampleModel のようにデータ要素ごとに 1 つずつ格納することも、SinglePixelPackedSampleModel や MultiPixelPackedSampleModel のように複数の要素を 1 つにまとめて格納することもできます。SampleModel は、サンプルが符号付き拡張形式かどうかも制御します。これにより、符号なしデータを byte、short、int など Java の符号付きデータ型として格納できます。
Raster は平面上のどこにでも存在できますが、SampleModel は (0, 0) から始まる簡易座標体系を利用します。このため、Raster は、Raster の座標体系と SampleModel の座標体系の間でピクセル位置をマッピングできるようにする変換因子を持っています。SampleModel の座標体系から Raster の座標体系への変換は、getSampleModelTranslateX メソッドと getSampleModelTranslateY メソッドによって取得できます。
Raster はほかの Raster と DataBuffer を共有できますが、このためには、このような Raster を明示的に作成するか、createChild メソッドと createTranslatedChild メソッドを使用します。これらのメソッドによって作成された Raster に対して getParent メソッドを使用すると、作成側 Raster への参照を取得できます。createTranslatedChild や createChild の呼び出しによって作成された Raster でない場合、getParent は null を返します。
createTranslatedChild メソッドは、現在の Raster のすべてのデータを共有する新しい Raster を返します。新しい Raster は、現在の Raster と同じ幅と高さの境界の矩形を占めますが、始点は異なります。たとえば、親の Raster が (10, 10) から (100, 100) までの領域を占める場合、変換後の Raster の領域の始点を (50, 50) に定義したときは、親のピクセル (20, 20) と子のピクセル (60, 60) はこれら 2 つの Raster で共有される DataBuffer で同じ位置を占めます。対応する SampleModel 座標を取得するには、前者の場合はピクセル座標に (-10, -10) が加算されるのに対し、後者の場合は (-50, -50) が加算されます。
Raster の親子間の変換は、親の sampleModelTranslateX と sampleModelTranslateY の値から、子の sampleModelTranslateX と sampleModelTranslateY の値を減算することにより判定できます。
createChild メソッドを使うと、親の境界の矩形 (同じ座標体系または変換後の座標体系を持つ) のサブセットのみを占める新しい Raster や、親のバンドのサブセットを持つ新しい Raster を作成できます。
コンストラクタはすべて protected です。Raster を作成する方法としては、このクラスで定義されている static な create メソッドの 1 つを使うのが正しい方法です。これらのメソッドを使うと、標準のインタリーブ化された SampleModel、バンド化された SmpleModel、およびパックされた SampleModel を使う Raster のインスタンスが生成され、外部で生成された SampleModel と DataBuffer を結合して作成される場合と比べて効率的に処理できます。
DataBuffer
,
SampleModel
,
PixelInterleavedSampleModel
,
BandedSampleModel
,
SinglePixelPackedSampleModel
,
MultiPixelPackedSampleModel
フィールドの概要 | |
protected DataBuffer |
dataBuffer
イメージデータを格納する DataBuffer です。 |
protected int |
height
この Raster の高さです。 |
protected int |
minX
この Raster の左上隅のピクセルの X 座標です。 |
protected int |
minY
この Raster の左上隅のピクセルの Y 座標です。 |
protected int |
numBands
Raster 内のバンド数です。 |
protected int |
numDataElements
1 ピクセル当たりの DataBuffer データ要素の数です。 |
protected Raster |
parent
この Raster の親、または null です。 |
protected SampleModel |
sampleModel
この Raster のピクセルが DataBuffer に格納される方法を記述する SampleModel です。 |
protected int |
sampleModelTranslateX
Raster の SampleModel の座標空間から Raster の座標空間への X 変換です。 |
protected int |
sampleModelTranslateY
Raster の SampleModel の座標空間から Raster の座標空間への Y 変換です。 |
protected int |
width
この Raster の幅です。 |
コンストラクタの概要 | |
protected |
Raster(SampleModel sampleModel,
DataBuffer dataBuffer,
Point origin)
指定された SampleModel と DataBuffer を持つ Raster を構築します。 |
protected |
Raster(SampleModel sampleModel,
DataBuffer dataBuffer,
Rectangle aRegion,
Point sampleModelTranslate,
Raster parent)
指定された SampleModel、DataBuffer、および親を持つ Raster を構築します。 |
protected |
Raster(SampleModel sampleModel,
Point origin)
指定された SampleModel を持つ Raster を構築します。 |
メソッドの概要 | |
static WritableRaster |
createBandedRaster(DataBuffer dataBuffer,
int w,
int h,
int scanlineStride,
int[] bankIndices,
int[] bandOffsets,
Point location)
指定された DataBuffer、幅、高さ、走査線ストライド、バンクインデックス、およびバンクオフセットを持つ、BandedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createBandedRaster(int dataType,
int w,
int h,
int scanlineStride,
int[] bankIndices,
int[] bandOffsets,
Point location)
指定されたデータタイプ、幅、高さ、走査線ストライド、バンクインデックス、およびバンドオフセットを持つ、BandedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createBandedRaster(int dataType,
int w,
int h,
int bands,
Point location)
指定されたデータタイプ、幅、高さ、およびバンド数を持つ、BandedSampleModel に基づいた Raster を作成します。 |
Raster |
createChild(int parentX,
int parentY,
int width,
int height,
int childMinX,
int childMinY,
int[] bandList)
この Raster の DataBuffer のすべてまたは一部を共有する新しい Raster を返します。 |
WritableRaster |
createCompatibleWritableRaster()
この Raster と同じ SampleModel と初期化された新しい DataBuffer を持つ、この Raster と同じサイズで互換性のある WritableRaster を作成します。 |
WritableRaster |
createCompatibleWritableRaster(int w,
int h)
指定されたサイズ、新しい SampleModel、初期化された新しい DataBuffer を持つ、互換性のある WritableRaster を作成します。 |
WritableRaster |
createCompatibleWritableRaster(int x,
int y,
int w,
int h)
指定された位置 (minX, minY) とサイズ (width, height)、新しい SampleModel、および初期化された新しい DataBuffer を持つ、互換性のある WritableRaster を作成します。 |
WritableRaster |
createCompatibleWritableRaster(Rectangle rect)
rect によって指定される位置 (minX, minY) とサイズ (width, height)、新しい SampleModel、および初期化された新しい DataBuffer を持つ、互換性のある WritableRaster を作成します。 |
static WritableRaster |
createInterleavedRaster(DataBuffer dataBuffer,
int w,
int h,
int scanlineStride,
int pixelStride,
int[] bandOffsets,
Point location)
指定された DataBuffer、幅、高さ、走査線ストライド、ピクセルストライド、およびバンドオフセットを持つ、PixelInterleavedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createInterleavedRaster(int dataType,
int w,
int h,
int scanlineStride,
int pixelStride,
int[] bandOffsets,
Point location)
指定されたデータタイプ、幅、高さ、走査線ストライド、ピクセルストライド、およびバンドオフセットを持つ、PixelInterleavedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createInterleavedRaster(int dataType,
int w,
int h,
int bands,
Point location)
指定されたデータタイプ、幅、高さ、およびバンド数を持つ、PixelInterleavedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createPackedRaster(DataBuffer dataBuffer,
int w,
int h,
int scanlineStride,
int[] bandMasks,
Point location)
指定された DataBuffer、幅、高さ、走査線ストライド、およびバンドマスクを持つ、SinglePixelPackedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createPackedRaster(DataBuffer dataBuffer,
int w,
int h,
int bitsPerPixel,
Point location)
指定された DataBuffer、幅、高さ、および 1 ピクセル当たりのビット数を持つ、MultiPixelPackedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createPackedRaster(int dataType,
int w,
int h,
int[] bandMasks,
Point location)
指定されたデータタイプ、幅、高さ、およびバンドマスクを持つ、SinglePixelPackedSampleModel に基づいた Raster を作成します。 |
static WritableRaster |
createPackedRaster(int dataType,
int w,
int h,
int bands,
int bitsPerBand,
Point location)
指定されたデータタイプ、幅、高さ、バンド数、および 1 バンド当たりのビット数を持つ、パックされた SampleModel に基づいた Raster を作成します。 |
static Raster |
createRaster(SampleModel sm,
DataBuffer db,
Point location)
指定された SampleModel と DataBuffer を持つ Raster を作成します。 |
Raster |
createTranslatedChild(int childMinX,
int childMinY)
この Raster と同じサイズ、SampleModel、および DataBuffer を持ち、位置が異なる Raster を作成します。 |
static WritableRaster |
createWritableRaster(SampleModel sm,
DataBuffer db,
Point location)
指定された SampleModel と DataBuffer を持つ WritableRaster を作成します。 |
static WritableRaster |
createWritableRaster(SampleModel sm,
Point location)
指定された SampleModel を持つ WritableRaster を作成します。 |
Rectangle |
getBounds()
この Raster の境界の Rectangle を返します。 |
DataBuffer |
getDataBuffer()
この Raster に関連した DataBuffer を返します。 |
Object |
getDataElements(int x,
int y,
int w,
int h,
Object outData)
指定されたピクセル矩形のピクセルデータを transferType 型のプリミティブ配列として返します。 |
Object |
getDataElements(int x,
int y,
Object outData)
1 つのピクセルのデータを transferType 型のプリミティブ配列として返します。 |
int |
getHeight()
Raster の高さをピクセル単位で返します。 |
int |
getMinX()
Raster の有効な最小の X 座標を返します。 |
int |
getMinY()
Raster の有効な最小の Y 座標を返します。 |
int |
getNumBands()
この Raster 内のバンド数 (1 ピクセル当たりのサンプル数) を返します。 |
int |
getNumDataElements()
getDataElements メソッドと setDataElements メソッドにより 1 つのピクセルを転送するために必要なデータ要素の数を返します。 |
Raster |
getParent()
この Raster の親 Raster があればそれを返します。 |
double[] |
getPixel(int x,
int y,
double[] dArray)
指定されたピクセルのサンプルを double の配列として返します。 |
float[] |
getPixel(int x,
int y,
float[] fArray)
指定されたピクセルのサンプルを float の配列として返します。 |
int[] |
getPixel(int x,
int y,
int[] iArray)
指定されたピクセルのサンプルを int の配列として返します。 |
double[] |
getPixels(int x,
int y,
int w,
int h,
double[] dArray)
矩形のピクセルのサンプルすべてを、配列要素ごとに 1 つのサンプルが格納されている double 配列として返します。 |
float[] |
getPixels(int x,
int y,
int w,
int h,
float[] fArray)
矩形のピクセルのサンプルすべてを、配列要素ごとに 1 つのサンプルが格納されている float 配列として返します。 |
int[] |
getPixels(int x,
int y,
int w,
int h,
int[] iArray)
矩形のピクセルのサンプルすべてを、配列要素ごとに 1 つのサンプルが格納されている int 配列として返します。 |
int |
getSample(int x,
int y,
int b)
(x,y) に位置するピクセルの指定されたバンド内のサンプルを int として返します。 |
double |
getSampleDouble(int x,
int y,
int b)
(x,y) に位置するピクセルの指定されたバンド内のサンプルを double として返します。 |
float |
getSampleFloat(int x,
int y,
int b)
(x,y) に位置するピクセルの指定されたバンド内のサンプルを float として返します。 |
SampleModel |
getSampleModel()
イメージデータのレイアウトを記述する SampleModel を返します。 |
int |
getSampleModelTranslateX()
SampleModel の座標体系から Raster の座標体系への X 変換を返します。 |
int |
getSampleModelTranslateY()
SampleModel の座標体系から Raster の座標体系への Y 変換を返します。 |
double[] |
getSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray)
指定されたピクセル矩形の指定されたバンドのサンプルを、配列要素ごとに 1 つのサンプルが格納されている double 配列として返します。 |
float[] |
getSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray)
指定されたピクセル矩形の指定されたバンドのサンプルを、配列要素ごとに 1 つのサンプルが格納されている float 配列として返します。 |
int[] |
getSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray)
指定された矩形ピクセルの指定されたバンドのサンプルを、配列要素ごとに 1 つのサンプルが格納されている int 配列として返します。 |
int |
getTransferType()
getDataElements メソッドと setDataElements メソッドにより複数のピクセルを転送するために必要な transferType を返します。 |
int |
getWidth()
Raster の幅をピクセル単位で返します。 |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected SampleModel sampleModel
protected DataBuffer dataBuffer
protected int minX
protected int minY
protected int width
protected int height
protected int sampleModelTranslateX
protected int sampleModelTranslateY
protected int numBands
protected int numDataElements
protected Raster parent
コンストラクタの詳細 |
protected Raster(SampleModel sampleModel, Point origin)
sampleModel
- レイアウトを指定する SampleModelorigin
- 原点を指定した Pointprotected Raster(SampleModel sampleModel, DataBuffer dataBuffer, Point origin)
sampleModel
- レイアウトを指定する SampleModeldataBuffer
- イメージデータを格納する DataBufferorigin
- 原点を指定する Pointprotected Raster(SampleModel sampleModel, DataBuffer dataBuffer, Rectangle aRegion, Point sampleModelTranslate, Raster parent)
sampleModel
- レイアウトを指定する SampleModeldataBuffer
- イメージデータを格納する DataBufferaRegion
- イメージ領域を指定する RectanglesampleModelTranslate
- SampleModel から Raster 座標への変換を指定する Pointparent
- このラスタの親 (存在する場合)メソッドの詳細 |
public static WritableRaster createInterleavedRaster(int dataType, int w, int h, int bands, Point location)
Raster の左上隅は location 引数によって指定されます。location が null の場合は、(0, 0) が使用されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
インタリーブ化された DataBuffer.TYPE_INT
Raster はサポートされていません。DataBuffer.TYPE_INT
タイプの 1 バンドの Raster を作成するには、Raster.createPackedRaster() を使用します。
現在サポートされている dataType は、TYPE_BYTE および TYPE_USHORT だけです。
public static WritableRaster createInterleavedRaster(int dataType, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
Raster の左上隅は location 引数によって指定されます。location が null の場合は、(0, 0) が使用されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
インタリーブ化された DataBuffer.TYPE_INT
Raster はサポートされていません。DataBuffer.TYPE_INT
タイプの 1 バンドの Raster を作成するには、Raster.createPackedRaster() を使用します。
現在サポートされている dataType は、TYPE_BYTE および TYPE_USHORT だけです。
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合public static WritableRaster createBandedRaster(int dataType, int w, int h, int bands, Point location)
Raster の左上隅は location 引数によって指定されます。location が null の場合は、(0, 0) が使用されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
ArrayIndexOutOfBoundsException
- bands
が 1 未満の場合public static WritableRaster createBandedRaster(int dataType, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
Raster の左上隅は location 引数によって指定されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合ArrayIndexOutOfBoundsException
- bankIndices
または bandOffsets
が null
の場合public static WritableRaster createPackedRaster(int dataType, int w, int h, int[] bandMasks, Point location)
Raster の左上隅は location 引数によって指定されます。location が null の場合は、(0, 0) が使用されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合public static WritableRaster createPackedRaster(int dataType, int w, int h, int bands, int bitsPerBand, Point location)
バンド数が複数の場合、SampleModel は各バンドが bitsPerBand ビットを持つ SinglePixelPackedSampleModel になります。どちらの場合でも、対応する SampleModel によって義務付けられる dataType と bitsPerBand についての要件を満たさなければなりません。
Raster の左上隅は location 引数によって指定されます。location が null の場合は、(0, 0) が使用されます。dataType パラメータは、DataBuffer クラスで定義される、列挙された値の 1 つです。
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
IllegalArgumentException
- bitsPerBand
と bands
の積が、dataType
が保持するビット数より大きい場合IllegalArgumentException
- bitsPerBand
または bands
が 0 以下の場合IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合public static WritableRaster createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int pixelStride, int[] bandOffsets, Point location)
インタリーブ化された DataBuffer.TYPE_INT
Raster はサポートされていません。DataBuffer.TYPE_INT
タイプの 1 バンドの Raster を作成するには、Raster.createPackedRaster() を使用します。
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
のどちらでもない場合RasterFormatException
- dataBuffer
に複数のバンクがある場合public static WritableRaster createBandedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bankIndices, int[] bandOffsets, Point location)
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合public static WritableRaster createPackedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int[] bandMasks, Point location)
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合RasterFormatException
- dataBuffer
に複数のバンクがある場合public static WritableRaster createPackedRaster(DataBuffer dataBuffer, int w, int h, int bitsPerPixel, Point location)
IllegalArgumentException
- dataType
が、サポートされているデータタイプ DataBuffer.TYPE_BYTE
、DataBuffer.TYPE_USHORT
、DataBuffer.TYPE_INT
のどれでもない場合RasterFormatException
- dataBuffer
に複数のバンクがある場合public static Raster createRaster(SampleModel sm, DataBuffer db, Point location)
RasterFormatException
- dataBuffer
に複数のバンクがあり、sampleModel
が PixelInterleavedSampleModel、SinglePixelPackedSampleModel、または MultiPixelPackedSampleModel の場合public static WritableRaster createWritableRaster(SampleModel sm, Point location)
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
public static WritableRaster createWritableRaster(SampleModel sm, DataBuffer db, Point location)
現在サポートされている dataType は、TYPE_BYTE、TYPE_USHORT および TYPE_INT だけです。
RasterFormatException
- dataBuffer
に複数のバンクがあり、sampleModel
が PixelInterleavedSampleModel、SinglePixelPackedSampleModel、または MultiPixelPackedSampleModel の場合public Raster getParent()
public final int getSampleModelTranslateX()
public final int getSampleModelTranslateY()
public WritableRaster createCompatibleWritableRaster()
public WritableRaster createCompatibleWritableRaster(int w, int h)
RasterFormatException
- 幅または高さがゼロ以下の場合public WritableRaster createCompatibleWritableRaster(Rectangle rect)
public WritableRaster createCompatibleWritableRaster(int x, int y, int w, int h)
public Raster createTranslatedChild(int childMinX, int childMinY)
childMinX
- 新しい Raster の左上隅の X 座標childMinY
- 新しい Raster の左上隅の Y 座標public Raster createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList)
parentX、parentY、width、height の各パラメータによってこの Raster の座標空間に形成される Rectangle が、共有されるピクセル領域を示します。この Rectangle が現在の Raster の境界内にない場合は、エラーがスローされます。
新しい Raster はさらに、同じ平面上で現在の Raster が使用する座標体系とは異なる座標体系に変換できます。childMinX パラメータと childMinY パラメータにより、返された Raster の左上隅にあるピクセルの新しい座標 (x, y) が指定されます。新しい Raster 内の座標 (childMinX, childMinY) は、現在の Raster 内の座標 (parentX, parentY) と同じピクセルにマップされます。
bandList パラメータを使用して、新しい Raster が現在の Raster のバンドのサブセットだけを、場合によっては順序付をし直して、格納するように定義できます。bandList が null の場合は、現在の Raster のすべてのバンドが現在と同じ順序で格納されます。
現在の Raster の部分領域を保持するが、座標体系とバンドは現在の Raster と共有する新しい Raster を作成するには、childMinX を parentX と同じに、childMinY を parentY と同じに、bandList を null にそれぞれ指定して、このメソッドを呼び出します。
parentX
- この Raster の座標で左上隅の X 座標parentY
- この Raster の座標で左上隅の Y 座標width
- (parentX, parentY) から始まる領域の幅height
- (parentX, parentY) から始まる領域の高さchildMinX
- 返される Raster の左上隅の X 座標childMinY
- 返される Raster の左上隅の Y 座標bandList
- バンドインデックスの配列。すべてのバンドを使用する場合は nullRasterFormatException
- 指定された部分領域がラスタの境界の外側にある場合public Rectangle getBounds()
public final int getMinX()
public final int getMinY()
public final int getWidth()
public final int getHeight()
public final int getNumBands()
public final int getNumDataElements()
public final int getTransferType()
public DataBuffer getDataBuffer()
public SampleModel getSampleModel()
public Object getDataElements(int x, int y, Object outData)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標outData
- getTransferType() によって定義されるタイプと getNumDataElements() によって定義される長さを持つ配列へのオブジェクト参照。null の場合は、適切なタイプとサイズの配列が割り当てられるSampleModel.getDataElements(int, int, Object, DataBuffer)
public Object getDataElements(int x, int y, int w, int h, Object outData)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標width
- ピクセル矩形の幅height
- ピクセル矩形の高さoutData
- getTransferType() によって定義されるタイプと w*h*getNumDataElements() によって定義される長さを持つ配列へのオブジェクト参照。null の場合は、適切なタイプとサイズの配列が割り当てられるSampleModel.getDataElements(int, int, int, int, Object, DataBuffer)
public int[] getPixel(int x, int y, int[] iArray)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標iArray
- 必要に応じて事前に割り当てられた int 配列public float[] getPixel(int x, int y, float[] fArray)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標fArray
- 必要に応じて事前に割り当てられた float 配列public double[] getPixel(int x, int y, double[] dArray)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標dArray
- 必要に応じて事前に割り当てられた double 配列public int[] getPixels(int x, int y, int w, int h, int[] iArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さiArray
- 必要に応じて事前に割り当てられた int 配列public float[] getPixels(int x, int y, int w, int h, float[] fArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さfArray
- 必要に応じて事前に割り当てられた float 配列public double[] getPixels(int x, int y, int w, int h, double[] dArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さdArray
- 必要に応じて事前に割り当てられた double 配列public int getSample(int x, int y, int b)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドpublic float getSampleFloat(int x, int y, int b)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドpublic double getSampleDouble(int x, int y, int b)
x
- ピクセル位置の X 座標y
- ピクセル位置の Y 座標b
- 返されるバンドpublic int[] getSamples(int x, int y, int w, int h, int b, int[] iArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドiArray
- 必要に応じて事前に割り当てられた int 配列public float[] getSamples(int x, int y, int w, int h, int b, float[] fArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドfArray
- 必要に応じて事前に割り当てられた float 配列public double[] getSamples(int x, int y, int w, int h, int b, double[] dArray)
x
- 左上のピクセル位置の X 座標y
- 左上のピクセル位置の Y 座標w
- ピクセル矩形の幅h
- ピクセル矩形の高さb
- 返されるバンドdArray
- 必要に応じて事前に割り当てられた double 配列
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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.