|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.gui.EZ2DGL
public class EZ2DGL
A wrapper for GLCanvas that provides a simpler, 2D-only API. Takes care of fonts, textures, events, etc.
| Field Summary | |
|---|---|
EZ2DGLCanvas |
canvas
|
double |
centerX
|
double |
centerY
|
GLFont |
currentFont
|
int |
currentFontID
|
GLTexture |
currentTexture
|
int |
currentTextureID
|
javax.media.opengl.GL |
gl
|
javax.media.opengl.glu.GLU |
glu
|
double |
originX
|
double |
originY
|
double |
rotation
|
double |
scale
|
protected java.nio.ByteBuffer |
selectionBufferBytes
|
double |
tileScale
|
| Fields inherited from interface com.partnersoft.io.formats.rover.RoverConstants |
|---|
ALIGN_BOTTOM_CENTER, ALIGN_BOTTOM_FIT, ALIGN_BOTTOM_LEFT, ALIGN_BOTTOM_RIGHT, ALIGN_CENTER, ALIGN_CENTER_LEFT, ALIGN_CENTER_RIGHT, ALIGN_CODE_CENTER, ALIGN_CODE_FIT, ALIGN_CODE_HIGH, ALIGN_CODE_LOW, ALIGN_FIT, ALIGN_FIT_LEFT, ALIGN_FIT_RIGHT, ALIGN_TOP_CENTER, ALIGN_TOP_FIT, ALIGN_TOP_LEFT, ALIGN_TOP_RIGHT, COMMENT, DATA_FIELDS_MAX, EOF, FLOAT_COORDS, GEOMETRY_TYPE_NAMES, HAS_DATA, HAS_OFFSET, HAS_ROTATION, LIST, MASK_TYPECODE, NAMING, POINT, POINT_COLOR, POLYGON, POLYLINE, POP, PUSH, RENDER_FINDITEM, RENDER_INDICATION, RENDER_NORMAL, RENDER_SELECTION, ROTATION_MULT, TEXEL_COORD_MAX, TEXEL_COORD_SIZE, TEXT, TILE_COORD_MAX, TILE_SIZE_PIXELS, VALUE |
| Constructor Summary | |
|---|---|
EZ2DGL(EZ2DGLCanvas canvas,
javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
|
|
| Method Summary | |
|---|---|
void |
clear()
Clears the buffer and sets it to the background color. |
void |
displayThumbTwiddle()
|
void |
drawBullseye()
|
void |
drawCircle(int dataID,
double centerX,
double centerY,
double radius)
|
void |
drawPolygon(int dataID,
DoubleBuffer coords)
Draws a filled polygon in the foreground color. |
void |
drawPolyline(int dataID,
DoubleBuffer coords)
Draws a filled polyline in the foreground color. |
void |
drawString(int fontID,
double x,
double y,
float rotation,
int alignment,
double fontScale,
java.lang.String text)
|
void |
drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double textureScale)
Just draws the given texture as a rotated, scaled icon. |
void |
drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double scale,
double red,
double green,
double blue,
double alpha)
Just draws the given texture as a rotated, scaled icon. |
void |
drawTriangle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double z)
|
int[][] |
endSelection()
|
void |
endTile()
|
EZ2DGLCanvas |
getCanvas()
|
void |
popName()
|
void |
pushName(int ID)
|
void |
setBackgroundColor(int rgb)
|
void |
setCurrentTexture(int textureID)
Sets up for drawing with textures. |
void |
setForegroundColor(int rgb)
|
void |
setLineStipple(int stipple)
|
void |
setLineWidth(float newWidth)
|
void |
setMarchingAnts(boolean marching,
boolean animated)
|
void |
setModelView(double centerX,
double centerY,
double rotation,
double scale)
This sets the viewing parameters, specified as a centerpoint, rotation, and scale. |
void |
startSelection()
|
void |
startTile(double originX,
double originY,
double tileScale)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public double centerX
public double centerY
public double rotation
public double scale
public double originX
public double originY
public double tileScale
public GLTexture currentTexture
public int currentTextureID
public javax.media.opengl.GL gl
public javax.media.opengl.glu.GLU glu
public int currentFontID
public GLFont currentFont
public EZ2DGLCanvas canvas
protected transient java.nio.ByteBuffer selectionBufferBytes
| Constructor Detail |
|---|
public EZ2DGL(EZ2DGLCanvas canvas,
javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu)
| Method Detail |
|---|
public void displayThumbTwiddle()
public void clear()
public void setBackgroundColor(int rgb)
public void setForegroundColor(int rgb)
public void setLineWidth(float newWidth)
public void setLineStipple(int stipple)
public void drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double textureScale)
public void drawTexture(int dataID,
int textureID,
double x,
double y,
double rotation,
double scale,
double red,
double green,
double blue,
double alpha)
public void drawPolygon(int dataID,
DoubleBuffer coords)
public void drawCircle(int dataID,
double centerX,
double centerY,
double radius)
public void drawPolyline(int dataID,
DoubleBuffer coords)
public void drawString(int fontID,
double x,
double y,
float rotation,
int alignment,
double fontScale,
java.lang.String text)
public EZ2DGLCanvas getCanvas()
public void setModelView(double centerX,
double centerY,
double rotation,
double scale)
public void startTile(double originX,
double originY,
double tileScale)
public void endTile()
public void drawTriangle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double z)
public void startSelection()
public int[][] endSelection()
public void setCurrentTexture(int textureID)
public void drawBullseye()
public void pushName(int ID)
public void popName()
public void setMarchingAnts(boolean marching,
boolean animated)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||