public class SepiaTone extends FilterEffect<T>
Effect.AccelTypeDefaultInput| Constructor and Description |
|---|
SepiaTone()
Constructs a new
SepiaTone effect with the default
level value (1.0), using the default input for source data. |
SepiaTone(Effect input)
Constructs a new
SepiaTone effect with the default
level value (1.0). |
| Modifier and Type | Method and Description |
|---|---|
ImageData |
filterImageDatas(FilterContext fctx,
BaseTransform transform,
Rectangle outputClip,
T rstate,
ImageData... inputs)
Convenience method that sends the given input data through the
current peer, and then attempts to release the input image data.
|
Effect.AccelType |
getAccelType(FilterContext fctx)
Returns one of the
AccelType values, indicating
whether this Effect is accelerated in hardware for the
given FilterContext. |
Effect |
getInput()
Returns the input for this
Effect. |
float |
getLevel()
Returns the level value, which controls the intensity of the
sepia effect.
|
RenderState |
getRenderState(FilterContext fctx,
BaseTransform transform,
Rectangle outputClip,
Object renderHelper,
Effect defaultInput)
Returns the object representing the rendering strategy and state for
the filter operation characterized by the specified arguments.
|
boolean |
reducesOpaquePixels()
Whether an opacity for any pixel is different (lower)
than the corresponding pixel in the default input.
|
void |
setInput(Effect input)
Sets the input for this
Effect to a specific
Effect or to the default input if input is
null. |
void |
setLevel(float level)
Sets the level value, which controls the intensity of the sepia effect.
|
filter, getBounds, transform, untransform, untransformClipcombineBounds, combineBounds, createCompatibleImage, ensureTransform, getCompatibleImage, getDirtyRegions, getInputs, getNumInputs, getResultBounds, releaseCompatibleImage, setInput, transformBoundspublic SepiaTone()
SepiaTone effect with the default
level value (1.0), using the default input for source data.
This is a shorthand equivalent to:
new SepiaTone(DefaultInput)
public SepiaTone(Effect input)
SepiaTone effect with the default
level value (1.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 Effectpublic float getLevel()
public void setLevel(float level)
Min: 0.0
Max: 1.0
Default: 1.0
Identity: 0.0
level - the level valueIllegalArgumentException - if level is outside
the allowable rangepublic RenderState getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, 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 Effectpublic ImageData filterImageDatas(FilterContext fctx, BaseTransform transform, Rectangle outputClip, T rstate, ImageData... inputs)
filterImageDatas in class FilterEffect<T extends RenderState>public Effect.AccelType getAccelType(FilterContext fctx)
EffectAccelType values, indicating
whether this Effect is accelerated in hardware for the
given FilterContext.getAccelType in class EffectAccelType valuesCopyright © 2025. All rights reserved.