agile2d
Class Agile2D

java.lang.Object
  |
  +--agile2d.Agile2D

public class Agile2D
extends Object

A class containing static convenience methods and rendering hints for the Agile2D 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.
 
Method Summary
static boolean isOpenGLAvailable()
          Returns true if the Agile2D OpenGL Renderer is currently available, false if Agile2D 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.

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 agile2d.provider property.


isOpenGLAvailable

public static boolean isOpenGLAvailable()
Returns true if the Agile2D OpenGL Renderer is currently available, false if Agile2D 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.



Copyright © 2002 by University of Maryland, USA All rights reserved.