fsleyes.displaycontext.sceneopts
¶
This module provides the SceneOpts
class, which contains display
settings used by CanvasPanel
instances.
-
class
fsleyes.displaycontext.sceneopts.
SceneOpts
(panel)[source]¶ Bases:
__main__.MockClass
The
SceneOpts
class defines settings which are used byCanvasPanel
instances.Several of the properties of the
SceneOpts
class are defined in theSliceCanvasOpts
class, so see its documentation for more details.-
showCursor
= <MagicMock name='mock.Boolean()' id='140225911321168'>¶
-
zoom
= <MagicMock name='mock.Percentage()' id='140225911683824'>¶
-
bgColour
= <MagicMock name='mock.Colour()' id='140225911684736'>¶
-
cursorColour
= <MagicMock name='mock.Colour()' id='140225911357248'>¶
-
renderMode
= <MagicMock name='mock.Choice()' id='140225911357296'>¶
-
highDpi
= <MagicMock name='mock.Boolean()' id='140225911357344'>¶
-
fgColour
= <MagicMock name='mock.Colour()' id='140225918680896'>¶ Colour to use for foreground items (e.g. labels).
Note
This colour is automatically updated whenever the
bgColour
is changed. But it can be modified independently.
-
showColourBar
= <MagicMock name='mock.Boolean()' id='140225918039088'>¶ If
True
, and it is possible to do so, a colour bar is shown on the scene.
-
colourBarLocation
= <MagicMock name='mock.Choice()' id='140225920543424'>¶ This property controls the location of the colour bar, if it is being shown.
-
colourBarLabelSide
= <MagicMock name='mock.Choice()' id='140225920543424'>¶ This property controls the location of the colour bar labels, relative to the colour bar, if it is being shown.
-
colourBarSize
= <MagicMock name='mock.Percentage()' id='140225911562784'>¶ Size of the major axis of the colour bar, as a proportion of the available space.
-
labelSize
= <MagicMock name='mock.Int()' id='140225916854528'>¶ Font size used for any labels drawn on the canvas, including orthographic labels, and colour bar labels.
-
performance
= <MagicMock name='mock.Choice()' id='140225920543424'>¶ User controllable performance setting.
This property is linked to the
renderMode
property. Setting this property to a low value will result in faster rendering time, at the cost of increased memory usage and poorer rendering quality.See the
__onPerformanceChange()
method.
-
_SceneOpts__onBgColourChange
(*a)¶ Called when the background colour changes. Updates the
fgColour
to a complementary colour.
-
__module__
= 'fsleyes.displaycontext.sceneopts'¶
-
__init__
(panel)[source]¶ Create a
SceneOpts
instance.This method simply links the
performance
property to therenderMode
property.
-
movieSyncRefresh
= <MagicMock name='mock.Boolean()' id='140225918039088'>¶ Whether, when in movie mode, to synchronise the refresh for GL canvases. This is not possible in some platforms/environments. See
CanvasPanel.movieSyncRefresh
.
-
property
defaultMovieSyncRefresh
¶ # In movie mode, the canvas refreshes are # performed by the __syncMovieRefresh or # __unsyncMovieRefresh methods of the # CanvasPanel class. Some platforms/GL # drivers/environments seem to have a # problem with separate renders/buffer # swaps, so we have to use a shitty # unsynchronised update routine. # # These heuristics are not perfect - the # movieSyncRefresh property can therefore # be overridden by the user.
-
property
panel
¶ Return a reference to the
CanvasPanel
that owns thisSceneOpts
instance.
-
_onPerformanceChange
(*a)[source]¶ Called when the
performance
property changes.This method must be overridden by sub-classes to change the values of the
renderMode
property according to the new performance setting.
-