org.scilab.forge.scirenderer.implementation.g2d
Class G2DCanvas

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.g2d.G2DCanvas
All Implemented Interfaces:
Canvas

public final class G2DCanvas
extends java.lang.Object
implements Canvas

G2D implementation of a Canvas.

Author:
Calixte DENIZET

Method Summary
 void destroy()
          Destroy canvas : release Semaphore and associated threads
 void disableDraw()
           
 void draw()
           
 void enableDraw()
           
 int getAntiAliasingLevel()
          Anti-aliasing level getter.
 G2DBuffersManager getBuffersManager()
          Return the buffers manager of this canvas.
 java.awt.Dimension getDimension()
          Return the canvas dimension.
 DrawingTools getDrawingTools()
           
 int getHeight()
          Return the canvas height.
 Drawer getMainDrawer()
          Return the canvas main drawer.
 Motor3D getMotor3D()
          Return the OpenGl context.
 PickingManager getPickingManager()
          Return the picking manager.
 G2DRendererManager getRendererManager()
          Return the renderer manager.
 G2DTextureManager getTextureManager()
          Texture manger getter.
 int getWidth()
          Return the canvas width.
 void redraw()
          Ask the canvas to perform asynchronous drawing.
 void redrawAndWait()
          Ask the canvas to perform asynchronous drawing.
 void setAntiAliasingLevel(int antiAliasingLevel)
          Anti-aliasing level setter.
 void setGraphics(java.awt.Graphics2D g2d, int width, int height)
           
 void setMainDrawer(Drawer mainDrawer)
          Set this canvas main drawer.
 void waitImage()
          Wait until a drawing has been performed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDrawingTools

public DrawingTools getDrawingTools()

setGraphics

public void setGraphics(java.awt.Graphics2D g2d,
                        int width,
                        int height)

setMainDrawer

public void setMainDrawer(Drawer mainDrawer)
Description copied from interface: Canvas
Set this canvas main drawer.

Specified by:
setMainDrawer in interface Canvas
Parameters:
mainDrawer - the new canvas main drawer.

getMainDrawer

public Drawer getMainDrawer()
Description copied from interface: Canvas
Return the canvas main drawer.

Specified by:
getMainDrawer in interface Canvas
Returns:
the canvas main drawer.

getRendererManager

public G2DRendererManager getRendererManager()
Description copied from interface: Canvas
Return the renderer manager.

Specified by:
getRendererManager in interface Canvas
Returns:
the renderer manager.

getBuffersManager

public G2DBuffersManager getBuffersManager()
Description copied from interface: Canvas
Return the buffers manager of this canvas.

Specified by:
getBuffersManager in interface Canvas
Returns:
the buffers manager of this canvas.

getPickingManager

public PickingManager getPickingManager()
Description copied from interface: Canvas
Return the picking manager.

Specified by:
getPickingManager in interface Canvas
Returns:
the picking manager.

getTextureManager

public G2DTextureManager getTextureManager()
Description copied from interface: Canvas
Texture manger getter.

Specified by:
getTextureManager in interface Canvas
Returns:
the texture manager.

getWidth

public int getWidth()
Description copied from interface: Canvas
Return the canvas width.

Specified by:
getWidth in interface Canvas
Returns:
the canvas width.

getHeight

public int getHeight()
Description copied from interface: Canvas
Return the canvas height.

Specified by:
getHeight in interface Canvas
Returns:
the canvas height.

getDimension

public java.awt.Dimension getDimension()
Description copied from interface: Canvas
Return the canvas dimension.

Specified by:
getDimension in interface Canvas
Returns:
the canvas dimension.

getAntiAliasingLevel

public int getAntiAliasingLevel()
Description copied from interface: Canvas
Anti-aliasing level getter. - 0 for 1x - 1 for 2x - 2 for 4x - 3 for 8x - 4 for 16x

Specified by:
getAntiAliasingLevel in interface Canvas
Returns:
the anti-aliasing level.

setAntiAliasingLevel

public void setAntiAliasingLevel(int antiAliasingLevel)
Description copied from interface: Canvas
Anti-aliasing level setter. - 0 for 1x - 1 for 2x - 2 for 4x - 3 for 8x - 4 for 16x

Specified by:
setAntiAliasingLevel in interface Canvas
Parameters:
antiAliasingLevel - the new level.

redraw

public void redraw()
Description copied from interface: Canvas
Ask the canvas to perform asynchronous drawing.

Specified by:
redraw in interface Canvas

redrawAndWait

public void redrawAndWait()
Description copied from interface: Canvas
Ask the canvas to perform asynchronous drawing.

Specified by:
redrawAndWait in interface Canvas

waitImage

public void waitImage()
Description copied from interface: Canvas
Wait until a drawing has been performed

Specified by:
waitImage in interface Canvas

disableDraw

public void disableDraw()

enableDraw

public void enableDraw()

draw

public void draw()

getMotor3D

public Motor3D getMotor3D()
Return the OpenGl context.

Returns:
the OpenGl context.

destroy

public void destroy()
Description copied from interface: Canvas
Destroy canvas : release Semaphore and associated threads

Specified by:
destroy in interface Canvas