public class PrEffectHelper
extends java.lang.Object
Constructor and Description |
---|
PrEffectHelper() |
Modifier and Type | Method and Description |
---|---|
(package private) static Rectangle |
clipbounds(Point2D cul,
Point2D cur,
Point2D cll,
Point2D clr) |
static Rectangle |
getGraphicsClipNoClone(Graphics g) |
(package private) static Point2D |
project(float x,
float y,
double vw,
double vh,
NGCamera cam,
BaseTransform inv,
PickRay tmpray,
Vec3d tmpvec,
Point2D ret) |
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) |
private static void |
unscale(Vec3d v,
double sx,
double sy) |
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
).static Point2D project(float x, float y, double vw, double vh, NGCamera cam, BaseTransform inv, PickRay tmpray, Vec3d tmpvec, Point2D ret)
private static void unscale(Vec3d v, double sx, double sy)