Viewport

The viewport is the area within a drawable in which the rendered image appears, specified in device coordinates (DC). A viewport which has boundaries outside of the drawable may be specified. Geometry that is mapped to values outside the drawable is clipped.

When the viewport is bound to the renderer, if the viewport's use_drawable flag is True the viewport width and height are obtained from the drawable's current width and height, and the viewport's depth is that indicated by the viewport attribute. If the use_drawable flag is False, then the viewport width, height and depth are all taken from the viewport attribute. The viewport is then set to the largest rectangle, justified to the lower left corner of the drawable, that achieves an isotropic mapping to the renderer's NPC subvolume. The viewport remains in the same position relative to the lower left hand corner of the drawable after a resize event occurs.

The complete list of renderer attributes is listed in the Renderer Attributes Table.

For an overview about Renderers, see General Information. For a list of all Renderer functions and related topics, see Rendering.