set_viewport_extent


bool set_viewport_extent(handle device,
                         int x,
                         int y,
                         dimensions* previous)

This function sets the dimensions of the viewport of a device.

Parameters

handle device

The handle of the device context.

int x

The width (in device units) of the viewport of the device.

int y

The height (in device units) of the viewport of the device.

idimensions* previous

A pointer to a structure to hold the previous width and height of the viewport. If null is specified, no previous viewport information is returned.

Return

bool

true The function succeeded.
false The call failed.

Notes

When any of the unit modes:

is set, calls to this function and to the function set_window_extent are ignored. When the unit mode is unit::isotropic, the function set_window_extent should be called prior to calling this function.