|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjava.awt.image.Raster
java.awt.image.WritableRaster
public class WritableRaster
이 클래스는, Raster 를 확장해 픽셀 기입 기능을 제공합니다. Raster 가 어떻게 픽셀을 포함할까에 대해서는, Raster 클래스의 설명을 참조해 주세요.
이 클래스의 생성자 은 protected 입니다. WritableRaster 의 인스턴스를 생성하려면 , Raster 클래스의 createWritableRaster 팩토리 메소드의 어느쪽이든을 사용합니다.
| 필드의 개요 |
|---|
| 클래스 java.awt.image. Raster 로부터 상속된 필드 |
|---|
dataBuffer , height , minX , minY , numBands , numDataElements , parent , sampleModel , sampleModelTranslateX , sampleModelTranslateY , width |
| 생성자 의 개요 | |
|---|---|
protected |
WritableRaster (SampleModel sampleModel,
DataBuffer dataBuffer,
Point origin)
지정된 SampleModel 및 DataBuffer 를 가지는 WritableRaster 를 구축합니다. |
protected |
WritableRaster (SampleModel sampleModel,
DataBuffer dataBuffer,
Rectangle aRegion,
Point sampleModelTranslate,
WritableRaster parent)
지정된 SampleModel, DataBuffer, 및 부모를 사용해 WritableRaster 를 구축합니다. |
protected |
WritableRaster (SampleModel sampleModel,
Point origin)
지정된 SampleModel 를 가지는 WritableRaster 를 구축합니다. |
| 메소드의 개요 | |
|---|---|
WritableRaster |
createWritableChild (int parentX,
int parentY,
int w,
int h,
int childMinX,
int childMinY,
int[] bandList)
이 WritableRaster 의 DataBuffer 의 전부 또는 일부를 공유하는 새로운 WritableRaster 를 돌려줍니다. |
WritableRaster |
createWritableTranslatedChild (int childMinX,
int childMinY)
이 WritableRaster 와 같은 사이즈, SampleModel, 및 DataBuffer 로, 위치가 다른 WritableRaster 를 생성합니다. |
WritableRaster |
getWritableParent ()
이 WritableRaster 의 부모의 WritableRaster (존재하는 경우), 또는 null 를 돌려줍니다. |
void |
setDataElements (int x,
int y,
int w,
int h,
Object inData)
픽셀 구형의 데이터를 TransferType 형의 프리미티브(primitive) 배열로부터 설정합니다. |
void |
setDataElements (int x,
int y,
Object inData)
1 개의 픽셀의 데이터를 transferType 형의 프리미티브(primitive) 배열로부터 설정합니다. |
void |
setDataElements (int x,
int y,
Raster inRaster)
픽셀의 구형의 데이터를 입력 Raster 로부터 설정합니다. |
void |
setPixel (int x,
int y,
double[] dArray)
샘플의 double 배열을 입력으로서 DataBuffer 내의 픽셀을 설정합니다. |
void |
setPixel (int x,
int y,
float[] fArray)
샘플의 float 배열을 입력으로서 사용해 DataBuffer 내의 픽셀을 설정합니다. |
void |
setPixel (int x,
int y,
int[] iArray)
샘플의 int 배열을 입력으로서 사용해 DataBuffer 내의 픽셀을 설정합니다. |
void |
setPixels (int x,
int y,
int w,
int h,
double[] dArray)
구형의 픽셀의 샘플 모든 것을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 double 배열로부터 설정합니다. |
void |
setPixels (int x,
int y,
int w,
int h,
float[] fArray)
구형의 픽셀의 샘플 모든 것을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 float 배열로부터 설정합니다. |
void |
setPixels (int x,
int y,
int w,
int h,
int[] iArray)
구형의 픽셀의 샘플 모든 것을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 int 배열로부터 설정합니다. |
void |
setRect (int dx,
int dy,
Raster srcRaster)
이 WritableRaster 에 Raster srcRaster 로부터 픽셀을 카피합니다. |
void |
setRect (Raster srcRaster)
이 WritableRaster 에 Raster srcRaster 로부터 픽셀을 카피합니다. |
void |
setSample (int x,
int y,
int b,
double s)
double 를 입력으로서 사용해, DataBuffer 내의 것 (x, y)에 위치하는 픽셀의, 지정된 밴드내의 샘플을 설정합니다. |
void |
setSample (int x,
int y,
int b,
float s)
float 를 입력으로서 사용해, DataBuffer 내의 것 (x, y)에 위치하는 픽셀의, 지정된 밴드내의 샘플을 설정합니다. |
void |
setSample (int x,
int y,
int b,
int s)
int 를 입력으로서 사용해, DataBuffer 내의 것 (x, y)에 위치하는 픽셀의, 지정된 밴드내의 샘플을 설정합니다. |
void |
setSamples (int x,
int y,
int w,
int h,
int b,
double[] dArray)
지정된 구형 픽셀의 지정된 밴드의 샘플을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 double 배열로부터 설정합니다. |
void |
setSamples (int x,
int y,
int w,
int h,
int b,
float[] fArray)
지정된 구형 픽셀의 지정된 밴드의 샘플을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 float 배열로부터 설정합니다. |
void |
setSamples (int x,
int y,
int w,
int h,
int b,
int[] iArray)
지정된 구형 픽셀의 지정된 밴드의 샘플을, 배열 요소 마다 1 개의 샘플이 포함되고 있는 int 배열로부터 설정합니다. |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| 생성자 의 상세 |
|---|
protected WritableRaster(SampleModel sampleModel,
Point origin)
sampleModel - 레이아웃을 지정하는 SampleModelorigin - 원점을 지정하는 Point
RasterFormatException - origin.x + sampleModel.getWidth() 와
origin.y + sampleModel.getHeight() 의 몇개의
계산으로, 정수형 오버플로우가 발생했다
경우
protected WritableRaster(SampleModel sampleModel,
DataBuffer dataBuffer,
Point origin)
sampleModel - 레이아웃을 지정하는 SampleModeldataBuffer - 이미지 데이터를 포함하는 DataBufferorigin - 원점을 지정하는 Point
RasterFormatException - origin.x + sampleModel.getWidth() 와
origin.y + sampleModel.getHeight() 의 몇개의
계산으로, 정수형 오버플로우가 발생했다
경우
protected WritableRaster(SampleModel sampleModel,
DataBuffer dataBuffer,
Rectangle aRegion,
Point sampleModelTranslate,
WritableRaster parent)
sampleModel - 레이아웃을 지정하는 SampleModeldataBuffer - 이미지 데이터를 포함하는 DataBufferaRegion - 이미지 영역을 지정하는 RectanglesampleModelTranslate - SampleModel 로부터 Raster 좌표에의
변환을 지정하는 Pointparent - 이 라스터의 부모 (존재하는 경우)
RasterFormatException - aRegion 의 폭 또는 높이가
제로 이하의 경우, 또는
aRegion.x + aRegion.width 와
aRegion.y + aRegion.height 의 몇개의 계산으로 정수형 오버플로우가
발생했을 경우| 메소드의 상세 |
|---|
public WritableRaster getWritableParent()
WritableRaster 의 부모,
또는 null
public WritableRaster createWritableTranslatedChild(int childMinX,
int childMinY)
childMinX - 새로운 Raster 의 좌상구석의 X 좌표childMinY - 새로운 Raster 의 좌상구석의 Y 좌표
WritableRaster
RasterFormatException - childMinX + this.getWidth() 와
childMinY + this.getHeight() 의
몇개의 계산으로 정수형 오버플로우가
발생했을 경우
public WritableRaster createWritableChild(int parentX,
int parentY,
int w,
int h,
int childMinX,
int childMinY,
int[] bandList)
이 WritableRaster 의 좌표 공간에, parentX, parentY, width, height 의 각 파라미터에 의해 Rectangle 가 형성되어 공유되는 픽셀 영역을 나타냅니다. 이 Rectangle 가 현재의 WritableRaster 의 경계내에 없는 경우는, 에러가 throw 됩니다.
새로운 WritableRaster 는 게다가 같은 평면상으로 현재의 WritableRaster 가 사용하는 좌표 체계와는 다른 좌표 체계로 변환할 수 있습니다. childMinX 파라미터와 childMinY 파라미터에 의해, 반환된 WritableRaster 의 좌상구석에 있는 픽셀의 새로운 좌표 (x, y)가 지정됩니다. 새로운 WritableRaster 내의 좌표 (childMinX, childMinY)는, 현재의 WritableRaster 내의 좌표 (parentX, parentY)와 같은 픽셀에 맵 됩니다.
bandList 파라미터를 사용해, 현재의 WritableRaster 의 밴드의 부분집합만을, 경우에 따라서는 순서를 변경해 포함하는 새로운 WritableRaster 를 정의할 수 있습니다. bandList 가 null 의 경우는, 현재의 WritableRaster 의 모든 밴드가 현재와 같은 순서로 포함됩니다.
현재의 WritableRaster 의 일부의 영역을 포함해, 좌표계와 밴드를 공유하는 새로운 WritableRaster 를 생성하려면 , childMinX 를 parentX 와 같은 값에, childMinY 를 parentY 와 같은 값에, bandList 를 null 에 각각 지정해, 이 메소드를 호출합니다.
parentX - 이 WritableRaster 의 좌표에서의
좌상구석의 X 좌표parentY - 이 WritableRaster 의 좌표에서의
좌상구석의 Y 좌표w - (parentX, parentY)로부터 시작되는 영역의 폭h - (parentX, parentY)로부터 시작되는 영역의 높이childMinX - 반환되는 WritableRaster 의
좌상구석의 X 좌표childMinY - 반환되는 WritableRaster 의
좌상구석의 Y 좌표bandList - 밴드 인덱스의 배열. 모든 밴드를 사용하는 경우는 null
WritableRaster 의 모두, 또는 일부의
DataBuffer 를 공유하는 WritableRaster
RasterFormatException - 부분 영역이 라스터의 경계의
외측에 있는 경우
RasterFormatException - w 또는
h 의
어느쪽이든가 제로 이하의 경우, 또는
parentX + w,parentY + h,
childMinX + w,
childMinY + h 의 몇개의 계산으로 정수형 오버플로우가
발생했을 경우
public void setDataElements(int x,
int y,
Object inData)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표inData - getTransferType()에 의해 정의된 형태와 getNumDataElements()에 의해
정의된 길이를 가져, x, y 에 배치하는 픽셀 데이터를
포함하는 배열에의 객체 참조
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 inData 가 너무 작아 입력을 보관 유지할 수 없는 경우SampleModel.setDataElements(int, int, Object, DataBuffer)
public void setDataElements(int x,
int y,
Raster inRaster)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표inRaster - x, y 에 배치하는 데이터가 포함되고 있는 Raster
NullPointerException - inRaster 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우
public void setDataElements(int x,
int y,
int w,
int h,
Object inData)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이inData - getTransferType()에 의해 정의된 형태를 가져,
길이가 w*h*getNumDataElements()로, x, y 와 x+w-1, y+h-1 의 사이에
배치하는 픽셀 데이터가 포함되고 있는 배열에의
객체 참조
NullPointerException - inData 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 inData 가 너무 작아 입력을 보관 유지할 수 없는 경우SampleModel.setDataElements(int, int, int, int, Object, DataBuffer) public void setRect(Raster srcRaster)
전송원 및 전송처의 Raster 의 모든 샘플이 정수형으로, 사이즈가 32 비트 이하의 경우, 이 메소드의 호출은, 양쪽 모두의 Raster 로 유효한 모든 x, y 주소로 다음의 코드를 실행하는 것과 같은 결과가 됩니다.
Raster srcRaster;
WritableRaster dstRaster;
for (int b = 0; b < srcRaster.getNumBands(); b++) {
dstRaster.setSample(x, y, b, srcRaster.getSample(x, y, b));
}
정수형의 전송원으로부터 정수형의 전송 먼저 카피가 실행되는 경우, 전송원샘플의 사이즈가 전송처 샘플의 사이즈보다 큰 밴드가 있으면(자), 전송원샘플의 상위 비트를 절약할 수 있습니다. 전송원샘플의 사이즈가 전송처 샘플의 사이즈보다 작은 밴드가 있으면(자), 전송처 샘플의 상위 비트에는, srcRaster 의 SampleModel 가 샘플을 부호 첨부의 수량으로서 취급할 때는 부호가 설정되어 부호 없음의 수량으로서 취급할 때는 제로가 설정됩니다. float 또는 double 의 전송원으로부터 정수형의 전송 먼저 카피가 실행되는 경우, 전송원샘플이 전송처의 형태에 캐스트 됩니다. 정수형의 전송원으로부터 float 또는 double 의 전송 먼저 카피되는 경우, 필요에 따라서, 상기의 정수형에 관한 규칙에 근거해 전송원이 최초로 32 비트의 정수형에 변환되어 float 또는 double 에 캐스트 됩니다.
srcRaster - 픽셀의 카피원의 Raster
NullPointerException - srcRaster 가 null 의 경우
public void setRect(int dx,
int dy,
Raster srcRaster)
setRect(Raster) 를 참조해 주세요.
dx - 카피의 src 공간으로부터 dst 공간에의 X 의
변환계수dy - 카피의 src 공간으로부터 dst 공간에의 Y 의
변환계수srcRaster - 픽셀의 카피원의 Raster
NullPointerException - srcRaster 가 null 의 경우
public void setPixel(int x,
int y,
int[] iArray)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표iArray - int 배열의 입력 샘플
NullPointerException - iArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 iArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setPixel(int x,
int y,
float[] fArray)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표fArray - float 배열의 입력 샘플
NullPointerException - fArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 fArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setPixel(int x,
int y,
double[] dArray)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표dArray - double 배열의 입력 샘플
NullPointerException - dArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 dArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setPixels(int x,
int y,
int w,
int h,
int[] iArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이iArray - 입력 int 픽셀 배열
NullPointerException - iArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 iArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setPixels(int x,
int y,
int w,
int h,
float[] fArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이fArray - 입력 float 픽셀 배열
NullPointerException - fArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 fArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setPixels(int x,
int y,
int w,
int h,
double[] dArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이dArray - 입력 double 픽셀 배열
NullPointerException - dArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표가 경계내에
존재하지 않는 경우, 또는 dArray 가 너무 작아 입력을 보관 유지할 수 없는 경우
public void setSample(int x,
int y,
int b,
int s)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표b - 설정되는 밴드s - 입력 샘플
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우
public void setSample(int x,
int y,
int b,
float s)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표b - 설정되는 밴드s - float 의 입력 샘플
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우
public void setSample(int x,
int y,
int b,
double s)
x - 픽셀 위치의 X 좌표y - 픽셀 위치의 Y 좌표b - 설정되는 밴드s - double 의 입력 샘플
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우
public void setSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이b - 설정되는 밴드iArray - 입력 int 의 샘플 배열
NullPointerException - iArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우, 또는 iArray 가 너무 작아
입력을 보관 유지할 수 없는 경우
public void setSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이b - 설정되는 밴드fArray - 입력 float 샘플 배열
NullPointerException - fArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우, 또는 fArray 가 너무 작아
입력을 보관 유지할 수 없는 경우
public void setSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray)
x - 좌상의 픽셀 위치의 X 좌표y - 좌상의 픽셀 위치의 Y 좌표w - 픽셀 구형의 폭h - 픽셀 구형의 높이b - 설정되는 밴드dArray - 입력 double 샘플 배열
NullPointerException - dArray 가 null 의 경우
ArrayIndexOutOfBoundsException - 좌표 또는 밴드 인덱스가
경계내에 없는 경우, 또는 dArray 가 너무 작아
입력을 보관 유지할 수 없는 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.