public class PrEffectHelper extends Object
Constructor and Description |
---|
PrEffectHelper() |
Modifier and Type | Method and Description |
---|---|
static Rectangle |
getGraphicsClipNoClone(Graphics g) |
static void |
render(Effect effect,
Graphics g,
float x,
float y,
Effect defaultInput)
Applies the given filter effect to the series of inputs and then renders
the result to the provided
Graphics at the specified
location. |
static void |
renderImageData(Graphics gdst,
ImageData srcData,
Rectangle dstBounds) |
public static void render(Effect effect, Graphics g, float x, float y, Effect defaultInput)
Graphics
at the specified
location.
This method is similar to the following pseudo-code:
g.drawTexture(effect.filter(g.getTransform()), x, y);except that it is likely to be more efficient (and correct).
effect
- the effect to be renderedg
- the Graphics
to which the Effect
will be
renderedx
- the x location of the filtered resulty
- the y location of the filtered resultdefaultInput
- the default input Effect
to be used if
any of the inputs for any of the effects in the
chain are unspecified (i.e. null
).Copyright © 2020. All rights reserved.