vispy.scene.cameras.magnify module

class vispy.scene.cameras.magnify.Magnify1DCamera(size_factor=0.25, radius_ratio=0.9, **kwargs)

Bases: vispy.scene.cameras.magnify.MagnifyCamera

Camera implementing a MagnifyTransform combined with PanZoomCamera.

Parameters
size_factorfloat

The size factor to use.

radius_ratiofloat

The radius ratio to use.

**kwargsdict

Keyword arguments to pass to PanZoomCamera and create a transform.

Notes

This Camera uses the mouse cursor position to set the center position of the MagnifyTransform, and uses mouse wheel events to adjust the magnification factor.

At high magnification, very small mouse movements can result in large changes, so we use a timer to animate transitions in the transform properties.

The camera also adjusts the size of its “lens” area when the view is resized.

transform_class

alias of vispy.visuals.transforms.nonlinear.Magnify1DTransform

class vispy.scene.cameras.magnify.MagnifyCamera(size_factor=0.25, radius_ratio=0.9, **kwargs)

Bases: vispy.scene.cameras.panzoom.PanZoomCamera

Camera implementing a MagnifyTransform combined with PanZoomCamera.

Parameters
size_factorfloat

The size factor to use.

radius_ratiofloat

The radius ratio to use.

**kwargsdict

Keyword arguments to pass to PanZoomCamera and create a transform.

Notes

This Camera uses the mouse cursor position to set the center position of the MagnifyTransform, and uses mouse wheel events to adjust the magnification factor.

At high magnification, very small mouse movements can result in large changes, so we use a timer to animate transitions in the transform properties.

The camera also adjusts the size of its “lens” area when the view is resized.

on_timer(event=None)

Timer event handler

Parameters
eventinstance of Event

The timer event.

transform_class

alias of vispy.visuals.transforms.nonlinear.MagnifyTransform

view_changed()

Called when this camera is changes its view. Also called when its associated with a viewbox.

viewbox_mouse_event(event)

The ViewBox mouse event handler

Parameters
eventinstance of Event

The mouse event.

viewbox_resize_event(event)

The ViewBox resize event handler

Parameters
eventinstance of Event

The viewbox resize event.