jpl.mipl.jade.graphics
Class Jade2D

java.lang.Object
  extended byjpl.mipl.jade.graphics.Jade2D

public class Jade2D
extends Object

A class containing static convenience methods, rendering hints and constants for the Jade2D rendering library.


Field Summary
static RenderingHints.Key KEY_CONVEX_SHAPE_HINT
          Hint indicating if polygons are convex.
static RenderingHints.Key KEY_GL_DRAWABLE_HINT
          Readonly hint containing reference to a GL Drawable if there is one.
static RenderingHints.Key KEY_GL_MODELVIEW_HINT
          Hint providing the matix to use as the initial OpenGL ModelView matrix during rendering.
static RenderingHints.Key KEY_GL_PROJECTION_HINT
          Hint providing the matix to use as the initial OpenGL Projection matrix during rendering.
static RenderingHints.Key KEY_IMMUTABLE_IMAGE_HINT
          Hint indicating if images are immutable.
static RenderingHints.Key KEY_IMMUTABLE_SHAPE_HINT
          Hint indicating if shapes are immutable.
static RenderingHints.Key KEY_INCREMENTAL_FONT_RENDERER_HINT
          Hint indicating the Fonts should be created incrementally.
static RenderingHints.Key KEY_USING_GL_HINT
          Readonly hint indicating if this graphics object is associated with a GL drawable.
static int STEREO_ANAGLYPH
          Anaglyph mode supports single band grayscale images as well as 3-band color RGB images.
static int STEREO_BOTH
          The rendering will be done to both left and right view.
static int STEREO_GL
          In STEREO_GL mode left view is rendered to the left buffer and right view is rendered to the right buffer.
static int STEREO_LEFT
          The rendering will be done to the Left eye How it's going to be done is stereo mode specific.
static int STEREO_OFF
          The rendering will be done with stereo capabilities turned off or ignored.
static int STEREO_RIGHT
          The rendering will be done to the Right eye How it's going to be done is stereo mode specific.
 
Method Summary
static boolean isOpenGLAvailable()
          Returns true if the Jade2D OpenGL Renderer is currently available, false if Jade2D is using the standard Java renderer.
static boolean isOpenGLEnabled()
          Returns true if the OpenGL pluggable renderer is enabled, false otherwise.
static boolean isOpenGLGraphics(Graphics g)
          Returns true if the specified Graphics object is associated with an OpenGL drawable.
static void setOpenGLEnabled(boolean val)
          Sets whether the OpenGL pluggable renderer is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_USING_GL_HINT

public static final RenderingHints.Key KEY_USING_GL_HINT
Readonly hint indicating if this graphics object is associated with a GL drawable. This rendering hint will be set to Boolean.TRUE for a Graphics2D object that is attached to a GL Drawable.


KEY_GL_DRAWABLE_HINT

public static final RenderingHints.Key KEY_GL_DRAWABLE_HINT
Readonly hint containing reference to a GL Drawable if there is one. This rendering hint will be set to a GL4Java GLDrawable object for Graphics2D objects that are drawing using GL4Java. It will be set to null otherwise. You can use this hint to obtain the GLFunc and GLUFunc objects attached to the drawable.


KEY_GL_MODELVIEW_HINT

public static final RenderingHints.Key KEY_GL_MODELVIEW_HINT

Hint providing the matix to use as the initial OpenGL ModelView matrix during rendering. If this is non-null, it must be a sixteen element double array in the standard OpenGL arrangement. This matrix is post-multiplied by the Graphic's AffineTransform to generate the final GL matrix used during rendering.


KEY_GL_PROJECTION_HINT

public static final RenderingHints.Key KEY_GL_PROJECTION_HINT

Hint providing the matix to use as the initial OpenGL Projection matrix during rendering. If this is non-null, it must be a sixteen element double array in the standard OpenGL arrangement.


KEY_CONVEX_SHAPE_HINT

public static final RenderingHints.Key KEY_CONVEX_SHAPE_HINT
Hint indicating if polygons are convex. If this rendering hint is set to Boolean.TRUE, then polygons generated using the draw(), fill() or fillPolygon() methods are assumed to be convex, and may be rendered using a faster algorithm. If this is Boolean.FALSE or null (the default), the Graphics2D renderer assumes that all polygons are concave.


KEY_IMMUTABLE_SHAPE_HINT

public static final RenderingHints.Key KEY_IMMUTABLE_SHAPE_HINT

Hint indicating if shapes are immutable. If this rendering hint is set to Boolean.TRUE, then Shape and Polygon objects drawn using draw() or fill() are assumed to be immutable - that is, the coordinates in the shape are assumed to never change. For immutable shapes, the renderer may cache information about the shape for reuse in future renderings. The default is Boolean.FALSE.


KEY_IMMUTABLE_IMAGE_HINT

public static final RenderingHints.Key KEY_IMMUTABLE_IMAGE_HINT

Hint indicating if images are immutable. If this rendering hint is set to Boolean.TRUE, then Images drawn using drawImage() are assumed to be immutable - that is, the contents of the image is assumed never to change. For immutable images, the renderer caches information about the image for reuse in future renderings.

The default is Boolean.TRUE.


KEY_INCREMENTAL_FONT_RENDERER_HINT

public static final RenderingHints.Key KEY_INCREMENTAL_FONT_RENDERER_HINT

Hint indicating the Fonts should be created incrementally. If this rendering hint is set, the font glyphs are created just when needed, otherwise, the whole Font is created the first time one glyph is needed. For zooming interfaces, creating font incrementally improves the performance when animating a zoom. For other types of interfaces, creating the font once is much faster.

The default is Boolean.FALSE.


STEREO_BOTH

public static final int STEREO_BOTH
The rendering will be done to both left and right view. It could be done either by drawing once to both eyes or drawing identical stuff to left view and then to right view.

See Also:
Constant Field Values

STEREO_LEFT

public static final int STEREO_LEFT
The rendering will be done to the Left eye How it's going to be done is stereo mode specific. For example OpenGL quad-buffer stereo would render to the left buffer. If double buffering is enabled it would render to the back left buffer, otherwise to the front left buffer. In anaglyph mode, left view will be rendered with color mask set to allow only red channel to go through.

See Also:
Constant Field Values

STEREO_RIGHT

public static final int STEREO_RIGHT
The rendering will be done to the Right eye How it's going to be done is stereo mode specific. For example OpenGL quad-buffer stereo would render to the right buffer. If double buffering is enabled it would render to the back right buffer, otherwise to the front right buffer. In anaglyph mode, left view will be rendered with color mask set to allow only red channel to go through.

See Also:
Constant Field Values

STEREO_OFF

public static final int STEREO_OFF
The rendering will be done with stereo capabilities turned off or ignored.

See Also:
Constant Field Values

STEREO_ANAGLYPH

public static final int STEREO_ANAGLYPH
Anaglyph mode supports single band grayscale images as well as 3-band color RGB images. Anaglyph's RGB image is constructed using Left image's Red(or the only plane in case of grayscale) plane and Right image's Green and Blue planes. In case if right image is greyscale Green and Blue planes are identical and represent input image.

See Also:
Constant Field Values

STEREO_GL

public static final int STEREO_GL
In STEREO_GL mode left view is rendered to the left buffer and right view is rendered to the right buffer. This mode requires computer's hardware to support quad-buffer configuration and ability to sync shutter glasses.

See Also:
Constant Field Values
Method Detail

isOpenGLEnabled

public static boolean isOpenGLEnabled()
Returns true if the OpenGL pluggable renderer is enabled, false otherwise.


setOpenGLEnabled

public static void setOpenGLEnabled(boolean val)
Sets whether the OpenGL pluggable renderer is enabled. This can be used by applications at runtime to override the jade2d.provider property.


isOpenGLAvailable

public static boolean isOpenGLAvailable()
Returns true if the Jade2D OpenGL Renderer is currently available, false if Jade2D is using the standard Java renderer.


isOpenGLGraphics

public static boolean isOpenGLGraphics(Graphics g)
Returns true if the specified Graphics object is associated with an OpenGL drawable.