public final class RGBGrayFilter extends RGBImageFilter
The high-resolution gray filter can be disabled globally using
Options.setHiResGrayFilterEnabled(boolean)
; it is enabled by default.
The global setting can be overridden per component by setting
the client property key Options.HI_RES_DISABLED_ICON_CLIENT_KEY
to Boolean.FALSE
.
Thanks to Andrej Golovnin for suggesting a simpler filter formula.
canFilterIndexColorModel, newmodel, origmodel
consumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Modifier and Type | Method and Description |
---|---|
int |
filterRGB(int x,
int y,
int rgb)
Converts a single input pixel in the default RGB ColorModel to a single
gray pixel.
|
static Icon |
getDisabledIcon(JComponent component,
Icon icon)
Returns an icon with a disabled appearance.
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
public static Icon getDisabledIcon(JComponent component, Icon icon)
component
- the component that will display the icon, may be null.icon
- the icon to generate disabled icon from.public int filterRGB(int x, int y, int rgb)
filterRGB
in class RGBImageFilter
x
- the horizontal pixel coordinatey
- the vertical pixel coordinatergb
- the integer pixel representation in the default RGB color modelColorModel.getRGBdefault()
,
RGBImageFilter.filterRGBPixels(int, int, int, int, int[], int, int)
Copyright © 2017 JGoodies Software GmbH. All rights reserved.