public class BufferedImageFilter extends ImageFilter implements Cloneable
BufferedImageFilter
クラスは、ImageFilter
をサブクラス化し、転送元と転送先が単一のイメージ演算子(BufferedImageOp
)を使用して、Image Producer/Consumer/ObserverパラダイムのBufferedImage
にフィルタをかける簡易な手段を提供します。イメージ演算子の例には、ConvolveOp
、AffineTransformOp
、およびLookupOp
があります。ImageFilter
, BufferedImage
, BufferedImageOp
consumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
コンストラクタと説明 |
---|
BufferedImageFilter(BufferedImageOp op)
指定された転送元と転送先が単一の演算子で
BufferedImageFilter を構築します。 |
修飾子と型 | メソッドと説明 |
---|---|
BufferedImageOp |
getBufferedImageOp()
BufferedImageOp を返します。 |
void |
imageComplete(int status)
ImageConsumer インタフェースのimageComplete メソッドで提供される情報をフィルタ処理します。 |
void |
setColorModel(ColorModel model)
ImageConsumer インタフェースのsetColorModel メソッドで提供される情報をフィルタ処理します。 |
void |
setDimensions(int width, int height)
ImageConsumer インタフェースのsetDimensions メソッドで提供される情報をフィルタ処理します。 |
void |
setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
byte配列をとる
ImageConsumer インタフェースのsetPixels メソッドで提供される情報をフィルタ処理します。 |
void |
setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
整数値配列をとる、
ImageConsumer インタフェースのsetPixels メソッドで提供される情報をフィルタ処理します。 |
clone, getFilterInstance, resendTopDownLeftRight, setHints, setProperties
public BufferedImageFilter(BufferedImageOp op)
BufferedImageFilter
を構築します。op
- BufferedImage
にフィルタをかける際に使用する、指定されたBufferedImageOp
NullPointerException
- opがnullの場合public BufferedImageOp getBufferedImageOp()
BufferedImageOp
を返します。BufferedImageFilter
の演算子。public void setDimensions(int width, int height)
ImageConsumer
インタフェースのsetDimensions
メソッドで提供される情報をフィルタ処理します。
注: このメソッドは、フィルタ処理の対象となるピクセルで構成されるImage
のImageProducer
によって呼び出されることを想定して実装されています。このクラスを使ってイメージからピクセルを取り出す場合は、このメソッドを直接呼び出さないようにしてください。このメソッドを直接呼び出すと、要求されているピクセルを取り出す上で問題が生じる可能性があります。
setDimensions
、インタフェース: ImageConsumer
setDimensions
、クラス: ImageFilter
width
- このBufferedImageFilter
に設定する幅height
- このBufferedImageFilter
に設定する高さImageConsumer.setDimensions(int, int)
public void setColorModel(ColorModel model)
ImageConsumer
インタフェースのsetColorModel
メソッドで提供される情報をフィルタ処理します。
model
がnull
の場合、このメソッドはBufferedImageFilter
の現在のColorModel
を消去します。
注: このメソッドは、フィルタ処理の対象となるピクセルで構成されるImage
のImageProducer
によって呼び出されることを想定して実装されています。このクラスを使ってイメージからピクセルを取り出す場合は、このメソッドを直接呼び出さないようにしてください。このメソッドを直接呼び出すと、要求されているピクセルを取り出す上で問題が生じる可能性があります。
setColorModel
、インタフェース: ImageConsumer
setColorModel
、クラス: ImageFilter
model
- このBufferedImageFilter
のColorModel
に設定するColorModel
ImageConsumer.setColorModel(java.awt.image.ColorModel)
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
ImageConsumer
インタフェースのsetPixels
メソッドで提供される情報をフィルタ処理します。
注: このメソッドは、フィルタ処理の対象となるピクセルで構成されるImage
のImageProducer
によって呼び出されることを想定して実装されています。このクラスを使ってイメージからピクセルを取り出す場合は、このメソッドを直接呼び出さないようにしてください。このメソッドを直接呼び出すと、要求されているピクセルを取り出す上で問題が生じる可能性があります。
setPixels
、インタフェース: ImageConsumer
setPixels
、クラス: ImageFilter
x
- 設定されるピクセルの領域の左上隅のX座標y
- 設定されるピクセルの領域の左上隅のY座標w
- ピクセル領域の幅h
- ピクセル領域の高さmodel
- 指定されたColorModel
pixels
- ピクセルの配列off
- pixels
配列へのオフセットscansize
- pixels
配列内のあるピクセル行から次のピクセル行までの距離IllegalArgumentException
- 幅または高さが0より小さい場合。ImageConsumer.setPixels(int, int, int, int, ColorModel, byte[], int, int)
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
ImageConsumer
インタフェースのsetPixels
メソッドで提供される情報をフィルタ処理します。
注: このメソッドは、フィルタ処理の対象となるピクセルで構成されるImage
のImageProducer
によって呼び出されることを想定して実装されています。このクラスを使ってイメージからピクセルを取り出す場合は、このメソッドを直接呼び出さないようにしてください。このメソッドを直接呼び出すと、要求されているピクセルを取り出す上で問題が生じる可能性があります。
setPixels
、インタフェース: ImageConsumer
setPixels
、クラス: ImageFilter
x
- 設定されるピクセルの領域の左上隅のX座標y
- 設定されるピクセルの領域の左上隅のY座標w
- ピクセル領域の幅h
- ピクセル領域の高さmodel
- 指定されたColorModel
pixels
- ピクセルの配列off
- pixels
配列へのオフセットscansize
- pixels
配列内のあるピクセル行から次のピクセル行までの距離IllegalArgumentException
- 幅または高さが0より小さい場合。ImageConsumer.setPixels(int, int, int, int, ColorModel, int[], int, int)
public void imageComplete(int status)
ImageConsumer
インタフェースのimageComplete
メソッドで提供される情報をフィルタ処理します。
注: このメソッドは、フィルタ処理の対象となるピクセルで構成されるImage
のImageProducer
によって呼び出されることを想定して実装されています。このクラスを使ってイメージからピクセルを取り出す場合は、このメソッドを直接呼び出さないようにしてください。このメソッドを直接呼び出すと、要求されているピクセルを取り出す上で問題が生じる可能性があります。
imageComplete
、インタフェース: ImageConsumer
imageComplete
、クラス: ImageFilter
status
- イメージ・ロードのステータスImagingOpException
- このインスタンスに関連したBufferedImageOp
のフィルタ・メソッドの呼出しに問題がある場合。ImageConsumer.imageComplete(int)
バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.Use is subject to license termsDocumentation Redistribution Policyも参照してください。