View-class: View objects

Description Interface Signals Author(s)

Description

An abstraction of a widget that displays a Layer (and its children), possibly through a transformation. A separate Layer can provide an overlay that is constant across transformations. If a layer is too large to display in the viewport, the view should support scrolling. If the viewport is resizable, the view should offer some way to control its reaction to resizing.

Interface

The following active fields should be implemented by a View implementation. All are read/write unless noted.

layer: The Layer that is displayed.

overlay: The Layer that is drawn untransformed within the viewport. Could be thought of a heads up display.

transform: The Transform applied to the drawing of layer.

rescaleMode: Determines how the View behaves when resized, One of 'geometry', 'transform' or 'none'.

viewportRect: The rectangle (2x2 matrix) representing the geometry of the viewport in view coordinates. This provides the dimensions of the viewport, as well as its offset, which may not be zero if the view is larger than the viewport.

Signals

viewportRectChanged()

Emitted when the viewportRect field has changed, i.e., the viewport/view has changed size, or the view has been scrolled.

Author(s)

Michael Lawrence


ggobi/anypaint documentation built on May 17, 2019, 2:14 a.m.