fsleyes.gl.wxglslicecanvas
¶
This module provides the WXGLSliceCanvas
class, which is a
SliceCanvas
for use in a wx
application.
- class fsleyes.gl.wxglslicecanvas.WXGLSliceCanvas(parent, overlayList, displayCtx, zax=0)[source]¶
Bases:
fsleyes.gl.slicecanvas.SliceCanvas
,fsleyes.gl.WXGLCanvasTarget
,__main__.docbuilder.run.<locals>.MockClass
The
WXGLSliceCanvas
is aSliceCanvas
, awx.glcanvas.GLCanvas
and aWXGLCanvasTarget
. If you want to use aSliceCanvas
in yourwx
application, then you should use aWXGLSliceCanvas
.Note
The
WXGLSliceCanvas
assumes the existence of theSliceCanvas._updateDisplayBounds()
method.- __metaclass__ = <MagicMock name='mock.siplib.wrappertype' id='140604700048928'>¶
- __init__(parent, overlayList, displayCtx, zax=0)[source]¶
Create a
WXGLSliceCanvas
. SeeSliceCanvas.__init__()
for details on the arguments.
- destroy()[source]¶
Must be called when this
WXGLSliceCanvas
is no longer needed. Clears some event listeners and calls the base classdestroy
method.
- __onResize(ev)¶
Called on
wx.EVT_SIZE
events, when the canvas is resized. When the canvas is resized, we have to update the display bounds to preserve the aspect ratio.
- Show(show)[source]¶
Overrides
GLCanvas.Show
. When running over SSH/X11, it doesn’t seem to be possible to hide aGLCanvas
- the most recent scene displayed on the canvas seems to persist, does not get overridden, and gets drawn on top of other things in the interface:This is not ideal, and I have no idea why it occurs. The only workaround that I’ve found to work is, instead of hiding the canvas, to set its size to 0. So this method does just that.
- __annotations__ = {}¶
- __module__ = 'fsleyes.gl.wxglslicecanvas'¶