|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Object java.awt.image.ImageFilter java.awt.image.RGBImageFilter
public abstract class RGBImageFilter
ÀÌ Å¬·¡½º´Â µðÆúÆ® RGB ColorModel À̹ÌÁöÀÇ Çȼ¿À» ¼öÁ¤ÇÏ´Â ImageFilter¸¦ ¿ëÀÌÇÏ°Ô ÀÛ¼ºÇϱâ À§ÇÑ ¹æ¹ýÀ» Á¦°øÇÕ´Ï´Ù. ¶Ç, FilteredImageSource¿Í Á¶ÇÕÇØ, ±âÁ¸ À̹ÌÁöÀÇ ÇÊÅÍ Ã³¸®¿¡ »ç¿ëµË´Ï´Ù. ÀÌ Å¬·¡½º´Â 1°³ÀÇ ¸Þ¼µå¸¦ ÅëÇØ ¸ðµç Çȼ¿ µ¥ÀÌÅ͸¦ º¯È¯Çϱâ À§ÇÑ È£ÃâÀ» Á¦°øÇÏ´Â Ãß»ó Ŭ·¡½ºÀÔ´Ï´Ù. ÀÌ ¸Þ¼µå´Â ImageProducer ·Î »ç¿ëµÇ°í ÀÖ´Â ColorModel¿¡ °ü°è¾øÀÌ, µðÆúÆ®ÀÇ RGB ColorModel ·Î Çȼ¿À» ÇÑ ¹øÀ¸·Î º¯È¯ÇÕ´Ï´Ù. »ç¿ëÇÒ ¼ö ÀÖ´Â À̹ÌÁö ÇÊÅ͸¦ ÀÛ¼ºÇϱâ À§Çؼ Á¤ÀÇÇÒ ÇÊ¿ä°¡ ÀÖ´Â °ÍÀº filterRGB ¸Þ¼µå »ÓÀÔ´Ï´Ù. ÀÌÇÏ¿¡ À̹ÌÁöÀÇ Àû»ö ¼ººÐ°ú û»ö ¼ººÐÀ» ±³È¯ÇÏ´Â ÇÊÅÍ Á¤ÀÇÀÇ ¿¹¸¦ ³ªÅ¸³À´Ï´Ù.
class RedBlueSwapFilter extends RGBImageFilter { public RedBlueSwapFilter() { // The filter's operation does not depend on the // pixel's location, so IndexColorModels can be // filtered directly. canFilterIndexColorModel = true; } public int filterRGB(int x, int y, int rgb) { return ((rgb & 0xff00ff00) | ((rgb & 0xff0000) >> 16) | ((rgb & 0xff) << 16)); } }
FilteredImageSource
,
ImageFilter
,
ColorModel.getRGBdefault()
ÇÊµå °³¿ä | |
---|---|
protected boolean |
canFilterIndexColorModel
ÀÌ boolean ÇüÀº IndexColorModel °´Ã¼ÀÇ Ä÷¯ Å×ÀÌºí ¿£Æ®¸®¿¡ ´ëÇؼ filterRGB ¸Þ¼µåÀÇ Ä÷¯ ÇÊÅÍ Ã³¸®¸¦, Çȼ¿ ´ÜÀ§ÀÇ ÇÊÅÍ Ã³¸® ´ë½Å¿¡ »ç¿ëÇÒ ¼ö ÀÖÀ»Áö ¾î¶³Áö¸¦ ³ªÅ¸³À´Ï´Ù. |
protected ColorModel |
newmodel
»ç¿ëÀÚ°¡ substituteColorModel À»
È£ÃâÇßÀ» ¶§¿¡ origmodel ¸¦ ¿Å°Ü³õ´Â ColorModel ÀÔ´Ï´Ù. |
protected ColorModel |
origmodel
»ç¿ëÀÚ°¡ substituteColorModel ¸¦
È£ÃâÇßÀ» ¶§¿¡ newmodel ¿¡ ÀÇÇØ ¿Å°Ü³õÀ» ¼ö ÀÖ´Â ColorModel ÀÔ´Ï´Ù. |
Ŭ·¡½º java.awt.image. ImageFilter ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
consumer |
ÀÎÅÍÆäÀ̽º java.awt.image. ImageConsumer ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
COMPLETESCANLINES,
IMAGEABORTED,
IMAGEERROR,
RANDOMPIXELORDER,
SINGLEFRAME,
SINGLEFRAMEDONE,
SINGLEPASS,
STATICIMAGEDONE,
TOPDOWNLEFTRIGHT |
»ý¼ºÀÚ °³¿ä | |
---|---|
RGBImageFilter ()
|
¸Þ¼µå °³¿ä | |
---|---|
IndexColorModel |
filterIndexColorModel (IndexColorModel icm)
IndexColorModel °´Ã¼¸¦ ÇÊÅÍ Ã³¸®ÇÕ´Ï´Ù. |
abstract int |
filterRGB (int x,
int y,
int rgb)
¼ºê Ŭ·¡½º´Â µðÆúÆ®ÀÇ RGB ColorModel 1°³ÀÇ ÀÔ·Â Çȼ¿À» 1°³ÀÇ Ãâ·Â Çȼ¿·Î º¯È¯ÇÏ´Â ¸Þ¼µå¸¦ ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù. |
void |
filterRGBPixels (int x,
int y,
int w,
int h,
int[] pixels,
int off,
int scansize)
µðÆúÆ®ÀÇ RGB ColorModel Çȼ¿ ¹öÆÛ¸¦ ÇÊÅÍ Ã³¸®ÇÕ´Ï´Ù. |
void |
setColorModel (ColorModel model)
ColorModel°¡ IndexColorModel ·Î ¼ºê Ŭ·¡½º°¡ canFilterIndexColorModel Ç÷¡±×¸¦ true ·Î ¼³Á¤ÇßÀ» °æ¿ì´Â ¿øÀÇ ColorModel °´Ã¼°¡ setPixels ¸Þ¼µå·Î È£ÃâµÇ´Â °÷Àº ¾îµð¿¡¼¶óµµ, ÇÊÅÍ Ã³¸®µÈ Ä÷¯ ¸ðµ¨¿¡ ¿Å°Ü³õ½À´Ï´Ù. |
void |
setPixels (int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
ColorModel °´Ã¼°¡ ÀÌ¹Ì º¯È¯µÈ °´Ã¼¿Í °°Àº °æ¿ì, º¯È¯µÈ ColorModel¸¦ »ç¿ëÇØ ´Ü¼øÇÏ°Ô Çȼ¿À» °Ç³×ÁÝ´Ï´Ù. |
void |
setPixels (int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
ColorModel °´Ã¼°¡ ÀÌ¹Ì º¯È¯µÈ °´Ã¼¿Í °°Àº °æ¿ì, º¯È¯µÈ ColorModel¸¦ »ç¿ëÇØ ´Ü¼øÇÏ°Ô Çȼ¿À» °Ç³×ÁÝ´Ï´Ù. |
void |
substituteColorModel (ColorModel oldcm,
ColorModel newcm)
ġȯ¿ëÀÇ 2°³ÀÇ ColorModel °´Ã¼¸¦ µî·ÏÇÕ´Ï´Ù. |
Ŭ·¡½º java.awt.image. ImageFilter ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
getFilterInstance,
imageComplete,
resendTopDownLeftRight,
setDimensions,
setHints,
setProperties |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
protected ColorModel origmodel
substituteColorModel
¸¦
È£ÃâÇßÀ» ¶§¿¡ newmodel
¿¡ ÀÇÇØ ¿Å°Ü³õÀ» ¼ö ÀÖ´Â ColorModel
ÀÔ´Ï´Ù.
protected ColorModel newmodel
substituteColorModel
À»
È£ÃâÇßÀ» ¶§¿¡ origmodel
¸¦ ¿Å°Ü³õ´Â ColorModel
ÀÔ´Ï´Ù.
protected boolean canFilterIndexColorModel
substituteColorModel(java.awt.image.ColorModel, java.awt.image.ColorModel)
,
filterRGB(int, int, int)
,
IndexColorModel
»ý¼ºÀÚ »ó¼¼ |
---|
public RGBImageFilter()
¸Þ¼µåÀÇ »ó¼¼ |
---|
public void setColorModel(ColorModel model)
ÁÖ: ÀÌ ¸Þ¼µå´Â ÇÊÅÍ Ã³¸®ÀÇ ´ë»óÀÌ µÇ´Â Çȼ¿·Î ±¸¼ºµÇ´Â Image
ImageProducer
¿¡ ÀÇÇØ È£ÃâµÇ´Â °ÍÀ» »óÁ¤ÇØ ±¸ÇöµÇ°í ÀÖ½À´Ï´Ù. ÀÌ Å¬·¡½º¸¦ »ç¿ëÇØ À̹ÌÁöÀÇ Çȼ¿À» ÇÊÅÍ Ã³¸®ÇÏ´Â °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇÏÁö ¸»¾Æ ÁÖ¼¼¿ä. ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇϸé, ÇÊÅÍ Á¶ÀÛÀ» ¹æÇØÇÒ °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù.
ImageConsumer
³»ÀÇ setColorModel
ImageFilter
³»ÀÇ setColorModel
model
- ÁöÁ¤µÈ ColorModel
ImageConsumer
,
ColorModel.getRGBdefault()
public void substituteColorModel(ColorModel oldcm, ColorModel newcm)
oldcm
- ó¸®ÁßÀ¸·Î ¿Å°ÜÁö´Â ColorModel °´Ã¼newcm
- ó¸®Áß¿¡ oldcm¸¦ ¿Å°Ü³õ´Â ColorModel °´Ã¼public IndexColorModel filterIndexColorModel(IndexColorModel icm)
icm
- ÇÊÅÍ Ã³¸®µÇ´Â IndexColorModel °´Ã¼
NullPointerException
- icm
°¡ nullÀÎ °æ¿ìpublic void filterRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize)
x, y
- Çȼ¿ ¿µ¿ªÀÇ Á»󱸼®ÀÇ ÁÂÇ¥w
- Çȼ¿ ¿µ¿ªÀÇ Æøh
- Çȼ¿ ¿µ¿ªÀÇ ³ôÀÌpixels
- Çȼ¿ÀÇ ¹è¿off
- pixels
¹è¿ÀÇ ¿ÀÇÁ¼Â(offset)scansize
- ¹è¿»ó¿¡¼ÀÇ Çȼ¿ÀÇ 1 ¿ÀÇ Å©±âColorModel.getRGBdefault()
,
filterRGB(int, int, int)
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
ÁÖ: ÀÌ ¸Þ¼µå´Â ÇÊÅÍ Ã³¸®ÀÇ ´ë»óÀÌ µÇ´Â Çȼ¿·Î ±¸¼ºµÇ´Â Image
ImageProducer
¿¡ ÀÇÇØ È£ÃâµÇ´Â °ÍÀ» »óÁ¤ÇØ ±¸ÇöµÇ°í ÀÖ½À´Ï´Ù. ÀÌ Å¬·¡½º¸¦ »ç¿ëÇØ À̹ÌÁöÀÇ Çȼ¿À» ÇÊÅÍ Ã³¸®ÇÏ´Â °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇÏÁö ¸»¾Æ ÁÖ¼¼¿ä. ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇϸé, ÇÊÅÍ Á¶ÀÛÀ» ¹æÇØÇÒ °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù.
ImageConsumer
³»ÀÇ setPixels
ImageFilter
³»ÀÇ setPixels
w
- Çȼ¿ ¿µ¿ªÀÇ Æøh
- Çȼ¿ ¿µ¿ªÀÇ ³ôÀÌmodel
- ÁöÁ¤µÈ ColorModel
pixels
- Çȼ¿ÀÇ ¹è¿off
- pixels
¹è¿ÀÇ ¿ÀÇÁ¼Â(offset)scansize
- pixels
¹è¿³»ÀÇ, ¾î´À Çȼ¿ÇàÀ¸·ÎºÎÅÍ ´ÙÀ½ÀÇ Çȼ¿Çà±îÁöÀÇ °Å¸®ColorModel.getRGBdefault()
,
filterRGBPixels(int, int, int, int, int[], int, int)
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
ÁÖ: ÀÌ ¸Þ¼µå´Â ÇÊÅÍ Ã³¸®ÀÇ ´ë»óÀÌ µÇ´Â Çȼ¿·Î ±¸¼ºµÇ´Â Image
ImageProducer
¿¡ ÀÇÇØ È£ÃâµÇ´Â °ÍÀ» »óÁ¤ÇØ ±¸ÇöµÇ°í ÀÖ½À´Ï´Ù. ÀÌ Å¬·¡½º¸¦ »ç¿ëÇØ À̹ÌÁöÀÇ Çȼ¿À» ÇÊÅÍ Ã³¸®ÇÏ´Â °³¹ßÀÚ´Â ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇÏÁö ¸»¾Æ ÁÖ¼¼¿ä. ÀÌ ¸Þ¼µå¸¦ Á÷Á¢ È£ÃâÇϸé, ÇÊÅÍ Á¶ÀÛÀ» ¹æÇØÇÒ °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù.
ImageConsumer
³»ÀÇ setPixels
ImageFilter
³»ÀÇ setPixels
w
- Çȼ¿ ¿µ¿ªÀÇ Æøh
- Çȼ¿ ¿µ¿ªÀÇ ³ôÀÌmodel
- ÁöÁ¤µÈ ColorModel
pixels
- Çȼ¿ÀÇ ¹è¿off
- pixels
¹è¿ÀÇ ¿ÀÇÁ¼Â(offset)scansize
- pixels
¹è¿³»ÀÇ, ¾î´À Çȼ¿ÇàÀ¸·ÎºÎÅÍ ´ÙÀ½ÀÇ Çȼ¿Çà±îÁöÀÇ °Å¸®ColorModel.getRGBdefault()
,
filterRGBPixels(int, int, int, int, int[], int, int)
public abstract int filterRGB(int x, int y, int rgb)
x, y
- Çȼ¿ÀÇ ÁÂÇ¥rgb
- µðÆúÆ® RGB Ä÷¯ ¸ðµ¨ÀÇ Á¤¼öÇü Çȼ¿ Ç¥Çö
ColorModel.getRGBdefault()
,
filterRGBPixels(int, int, int, int, int[], int, int)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.