viewport property

Rect? viewport
getter/setter pair

The sub-rectangle of the render target this view draws into, in normalized coordinates (0..1, with a top-left origin). null fills the whole target.

Ignored when target is set; a view renders the full extent of its render texture.

Implementation

// TODO(rendertarget): support viewport sub-rects on texture targets
// (requires compositing multiple views into one texture).
ui.Rect? viewport;