org.jzy3d.plot3d.rendering.canvas
Class VoidCanvas
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.canvas.VoidCanvas
-
-
Constructor Summary
Constructors Constructor and Description VoidCanvas(IChartComponentFactory factory, Scene scene, Quality quality)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddKeyController(java.lang.Object o)A generic interface for mouse listener to remain Windowing toolkit independant.voidaddMouseController(java.lang.Object o)A generic interface for mouse listener to remain Windowing toolkit independant.voiddispose()Performs all required cleanup when destroying a Canvas.voidforceRepaint()Invoked when a user requires the Canvas to be repainted (e.g.java.lang.StringgetDebugInfo()com.jogamp.opengl.GLDrawablegetDrawable()Returns the GLDrawable associated with the canvasRenderer3dgetRenderer()intgetRendererHeight()Returns the renderer's height, i.e.intgetRendererWidth()Returns the renderer's width, i.e.ViewgetView()Returns a reference to the held view.voidremoveKeyController(java.lang.Object o)A generic interface for key listener to remain Windowing toolkit independant.voidremoveMouseController(java.lang.Object o)A generic interface for key listener to remain Windowing toolkit independant.com.jogamp.opengl.util.texture.TextureDatascreenshot()Returns an image with the current renderer's sizecom.jogamp.opengl.util.texture.TextureDatascreenshot(java.io.File file)voidsetPixelScale(float[] scale)Defines pixel scale.
-
-
-
Constructor Detail
-
VoidCanvas
public VoidCanvas(IChartComponentFactory factory, Scene scene, Quality quality)
-
-
Method Detail
-
getView
public View getView()
Description copied from interface:ICanvasReturns a reference to the held view.
-
getDrawable
public com.jogamp.opengl.GLDrawable getDrawable()
Description copied from interface:ICanvasReturns the GLDrawable associated with the canvas- Specified by:
getDrawablein interfaceICanvas
-
getRendererWidth
public int getRendererWidth()
Description copied from interface:ICanvasReturns the renderer's width, i.e. the display width.- Specified by:
getRendererWidthin interfaceICanvas
-
getRendererHeight
public int getRendererHeight()
Description copied from interface:ICanvasReturns the renderer's height, i.e. the display height.- Specified by:
getRendererHeightin interfaceICanvas
-
getRenderer
public Renderer3d getRenderer()
- Specified by:
getRendererin interfaceICanvas
-
forceRepaint
public void forceRepaint()
Description copied from interface:ICanvasInvoked when a user requires the Canvas to be repainted (e.g. a non 3d layer has changed).- Specified by:
forceRepaintin interfaceICanvas
-
screenshot
public com.jogamp.opengl.util.texture.TextureData screenshot()
Description copied from interface:ICanvasReturns an image with the current renderer's size- Specified by:
screenshotin interfaceICanvas
-
screenshot
public com.jogamp.opengl.util.texture.TextureData screenshot(java.io.File file) throws java.io.IOException- Specified by:
screenshotin interfaceICanvas- Throws:
java.io.IOException
-
dispose
public void dispose()
Description copied from interface:ICanvasPerforms all required cleanup when destroying a Canvas.
-
addMouseController
public void addMouseController(java.lang.Object o)
Description copied from interface:ICanvasA 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.- Specified by:
addMouseControllerin interfaceICanvas
-
addKeyController
public void addKeyController(java.lang.Object o)
Description copied from interface:ICanvasA 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.- Specified by:
addKeyControllerin interfaceICanvas
-
removeMouseController
public void removeMouseController(java.lang.Object o)
Description copied from interface:ICanvasA 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.- Specified by:
removeMouseControllerin interfaceICanvas
-
removeKeyController
public void removeKeyController(java.lang.Object o)
Description copied from interface:ICanvasA 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.- Specified by:
removeKeyControllerin interfaceICanvas
-
getDebugInfo
public java.lang.String getDebugInfo()
- Specified by:
getDebugInfoin interfaceICanvas
-
setPixelScale
public void setPixelScale(float[] scale)
Description copied from interface:ICanvasDefines pixel scale. On MacOS Retina displays, a X*Y chart uses a (X*2)*(Y*2) viewport. This makes some calculation based on viewport (such asCamera.screenToModel(com.jogamp.opengl.GL, com.jogamp.opengl.glu.GLU, org.jzy3d.maths.Coord3d)output wrong result. When running on Retina display, those two options fixed buggy mouse selections on Retina:- setPixelScale(new float[]{0.5f,0.5f})
- setPixelScale(new float[] { ScalableSurface.IDENTITY_PIXELSCALE,
ScalableSurface.IDENTITY_PIXELSCALE })
- Specified by:
setPixelScalein interfaceICanvas- See Also:
ScalableSurface#setSurfaceScale(float[])} in JOGL javadoc for more informations
-
-
DMelt 3.0 © DataMelt by jWork.ORG