|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inria.insitu.glite.managers.ImageManager
public class ImageManager
ImageManager implements the image rendering mechanism.
| Field Summary | |
|---|---|
static String |
KEY
Key for access in PaintConext. |
| Fields inherited from interface fr.inria.insitu.glite.managers.LiteManager |
|---|
KEY_CLIP, KEY_FONT, KEY_STENCIL, KEY_TESSELATOR, KEY_TRANSFORM, KEY_VERTEX_ARRAY |
| Constructor Summary | |
|---|---|
ImageManager(javax.media.opengl.GL gl)
Construct a new ImageManager. |
|
| Method Summary | |
|---|---|
void |
dispose()
Releases all the resources maintained by this object. |
void |
drawImage(BufferedImage img,
int x,
int y,
int w,
int h)
Draws an image at location (x,y) of size (width, height). |
void |
drawImageFromTexture(Image img,
int sx1,
int sy1,
int sx2,
int sy2,
Rectangle2D out)
Draws an image by copying it first in a texture. |
static ImageManager |
get(LitePaintContext ctx)
Returns an ImageManager from a LitePaintContext, creating it if needed. |
Graphics2D |
getGraphics()
|
BufferedImage |
getImage()
|
int |
getTexID()
|
static boolean |
isOpaque(Image image)
true if the image is known to have no alpha channel, and false if it may or may not have an alpha channel. |
static double |
linterp(double min,
double max,
double t)
Compute a linear interpolation at parameter t from min to max. |
void |
reset()
Resets the manager. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY
| Constructor Detail |
|---|
public ImageManager(javax.media.opengl.GL gl)
gl - the GL context| Method Detail |
|---|
public static ImageManager get(LitePaintContext ctx)
ctx - the LitePaintContext
public void reset()
reset in interface LiteManagerpublic void dispose()
dispose in interface LiteManagerpublic BufferedImage getImage()
public Graphics2D getGraphics()
public int getTexID()
public void drawImage(BufferedImage img,
int x,
int y,
int w,
int h)
Use direct OpenGL pixel drawing. Translation is honored but not scale or rotation. Use the texture based image drawing if you use scaling or general transformations.
img - the image to drawx - the x position where image should be drawny - the y position where image should be drawnw - the width to drawh - the height to draw
public static double linterp(double min,
double max,
double t)
min - the min valuemax - the max valuet - the parameter
public static boolean isOpaque(Image image)
image - the image
public void drawImageFromTexture(Image img,
int sx1,
int sy1,
int sx2,
int sy2,
Rectangle2D out)
img - the imagesx1 - left xsy1 - lower ysx2 - right xsy2 - right yout - bounds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||