public class OpacityFilter extends RGBImageFilter
canFilterIndexColorModel, newmodel, origmodel
consumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor and Description |
---|
OpacityFilter(double opacity,
boolean multiply)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
filterRGB(int x,
int y,
int rgb)
Convert a single input pixel in the default RGB ColorModel to a single output pixel.
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
public OpacityFilter(double opacity, boolean multiply)
opacity
- the opacity valuemultiply
- true if the current pixel opacity must be multiplied by the opacity value, false if the opaciy value must
replace the current pixel opacitypublic int filterRGB(int x, int y, int rgb)
multiply
flag:
multiply
flag is set to false, the pixel opacity will be replaced by the opacity
valuemultiply
flag is set to true, the pixel opacity will be multiplied by the opacity
valuefilterRGB
in class RGBImageFilter
x
- the X coordinate of the pixely
- the Y coordinate of the pixelrgb
- the integer pixel representation in the default RGB color modelCopyright © 2023. All rights reserved.