org.jzy3d.plot3d.rendering.canvas
Interface ICanvas

All Known Subinterfaces:
IScreenCanvas
All Known Implementing Classes:
CanvasAWT, CanvasNewtAwt, CanvasSwing, OffscreenCanvas, VoidCanvas

public interface ICanvas

A ICanvas represent the target component for rendering OpenGL. It might be displayed on the screen in a GUI (IScreenCanvas), or simply be an offscreen component able to export an image OffscreenCanvas.

Author:
Martin Pernollet
See Also:
IScreenCanvas}

Method Summary
 void addKeyController(Object o)
          A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.
 void addMouseController(Object o)
          A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.
 void dispose()
          Performs all required cleanup when destroying a Canvas.
 void forceRepaint()
          Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed).
 String getDebugInfo()
           
 javax.media.opengl.GLDrawable getDrawable()
          Returns the GLDrawable associated with the canvas
 Renderer3d getRenderer()
           
 int getRendererHeight()
          Returns the renderer's height, i.e. the display height.
 int getRendererWidth()
          Returns the renderer's width, i.e. the display width.
 View getView()
          Returns a reference to the held view.
 void removeKeyController(Object o)
          A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.
 void removeMouseController(Object o)
          A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.
 com.jogamp.opengl.util.texture.TextureData screenshot()
          Returns an image with the current renderer's size
 com.jogamp.opengl.util.texture.TextureData screenshot(File file)
           
 

Method Detail

getView

View getView()
Returns a reference to the held view.


getDrawable

javax.media.opengl.GLDrawable getDrawable()
Returns the GLDrawable associated with the canvas


getRendererWidth

int getRendererWidth()
Returns the renderer's width, i.e. the display width.


getRendererHeight

int getRendererHeight()
Returns the renderer's height, i.e. the display height.


getRenderer

Renderer3d getRenderer()

forceRepaint

void forceRepaint()
Invoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed).


screenshot

com.jogamp.opengl.util.texture.TextureData screenshot()
Returns an image with the current renderer's size


screenshot

com.jogamp.opengl.util.texture.TextureData screenshot(File file)
                                                      throws IOException
Throws:
IOException

dispose

void dispose()
Performs all required cleanup when destroying a Canvas.


addMouseController

void addMouseController(Object o)
A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.


addKeyController

void addKeyController(Object o)
A generic interface for mouse listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible mouse listener.


removeMouseController

void removeMouseController(Object o)
A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.


removeKeyController

void removeKeyController(Object o)
A generic interface for key listener to remain Windowing toolkit independant. * Implementation of this method should simply cast the input assuming it will correspond to canvas-compatible key listener.


getDebugInfo

String getDebugInfo()


Copyright © 2013. All rights reserved.