public class ColorAdjust extends CoreEffect<RenderState>
Effect.AccelType| Modifier and Type | Field and Description |
|---|---|
private float |
brightness |
private float |
contrast |
private float |
hue |
private float |
saturation |
DefaultInput| Constructor and Description |
|---|
ColorAdjust()
Constructs a new
ColorAdjust effect with the default hue (0.0),
saturation (0.0), brightness (0.0), and contrast (1.0),
using the default input for source data. |
ColorAdjust(Effect input)
Constructs a new
ColorAdjust effect with the default hue (0.0),
saturation (0.0), brightness (0.0), and contrast (0.0). |
| Modifier and Type | Method and Description |
|---|---|
float |
getBrightness()
Returns the brightness adjustment.
|
float |
getContrast()
Returns the contrast adjustment.
|
float |
getHue()
Returns the hue adjustment.
|
Effect |
getInput()
Returns the input for this
Effect. |
RenderState |
getRenderState(FilterContext fctx,
BaseTransform transform,
Rectangle outputClip,
java.lang.Object renderHelper,
Effect defaultInput)
Returns the object representing the rendering strategy and state for
the filter operation characterized by the specified arguments.
|
float |
getSaturation()
Returns the saturation adjustment.
|
boolean |
reducesOpaquePixels()
Whether an opacity for any pixel is different (lower)
than the corresponding pixel in the default input.
|
void |
setBrightness(float brightness)
Sets the brightness adjustment.
|
void |
setContrast(float contrast)
Sets the contrast adjustment.
|
void |
setHue(float hue)
Sets the hue adjustment.
|
void |
setInput(Effect input)
Sets the input for this
Effect to a specific
Effect or to the default input if input is
null. |
void |
setSaturation(float saturation)
Sets the saturation adjustment.
|
filterImageDatas, getAccelType, getPeer, updatePeerKey, updatePeerKeyfilter, getBounds, transform, untransform, untransformClipcombineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDefaultedInput, getDefaultedInput, getDirtyRegions, getInputs, getNumInputs, getResultBounds, getState, releaseCompatibleImage, setInput, transformBoundsprivate float hue
private float saturation
private float brightness
private float contrast
public ColorAdjust()
ColorAdjust effect with the default hue (0.0),
saturation (0.0), brightness (0.0), and contrast (1.0),
using the default input for source data.
This is a shorthand equivalent to:
new ColorAdjust(DefaultInput)
public ColorAdjust(Effect input)
ColorAdjust effect with the default hue (0.0),
saturation (0.0), brightness (0.0), and contrast (0.0).input - the single input Effectpublic final Effect getInput()
Effect.Effectpublic void setInput(Effect input)
Effect to a specific
Effect or to the default input if input is
null.input - the input for this Effectjava.lang.IllegalArgumentException - if input is nullpublic float getHue()
public void setHue(float hue)
Min: -1.0
Max: +1.0
Default: 0.0
Identity: 0.0
hue - the hue adjustmentjava.lang.IllegalArgumentException - if hue is outside the
allowable rangepublic float getSaturation()
public void setSaturation(float saturation)
Min: -1.0
Max: +1.0
Default: 0.0
Identity: 0.0
saturation - the saturation adjustmentjava.lang.IllegalArgumentException - if saturation is outside the
allowable rangepublic float getBrightness()
public void setBrightness(float brightness)
Min: -1.0
Max: +1.0
Default: 0.0
Identity: 0.0
brightness - the brightness adjustmentjava.lang.IllegalArgumentException - if brightness is outside the
allowable rangepublic float getContrast()
public void setContrast(float contrast)
Min: -1.0
Max: +1.0
Default: 0.0
Identity: 0.0
contrast - the contrast adjustmentjava.lang.IllegalArgumentException - if contrast is outside the
allowable rangepublic RenderState getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, java.lang.Object renderHelper, Effect defaultInput)
FilterEffectFilterContext object may be null.
outputClip and renderHelper may always be null just
as they may be null for a given filter operation.getRenderState in class FilterEffect<RenderState>fctx - the context object that would be used by the Renderer
if this call is preparing for a render operation, or nulltransform - the transform for the output of this operationoutputClip - the clip rectangle that may restrict this operation, or nullrenderHelper - the rendering helper object that can be used to shortcut
this operation under certain conditions, or nulldefaultInput - the Effect to be used in place of any null inputspublic boolean reducesOpaquePixels()
EffectreducesOpaquePixels in class Effect