| MIL 10 Reference
| Customize Help
| Save Settings

MdispZoom



See also
User Guide:
Reference:
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Next
Synopsis
Zoom a display.
Syntax
void MdispZoom(
MIL_ID DisplayId, //in
MIL_DOUBLE XFactor, //in
MIL_DOUBLE YFactor //in
)
Description

This function associates a zoom factor in X and/or in Y with the specified display. When an image buffer is selected for display, it will be zoomed according to these factors. The image buffer is displayed starting from its top-left corner, unless panning is also associated with the display (using MdispPan()).

Note that this function is not available on network displays.

Instead of explicity specifying a zoom factor, you can automatically scale the selected image buffer to fit the display, using MdispControl() with M_SCALE_DISPLAY. M_SCALE_DISPLAY ensures that the image aspect ratio is maintained. If you use M_SCALE_DISPLAY, the explicitly specified zoom factors (MdispZoom()) and pan settings (MdispPan()) will be overwritten.

For windowed and exclusive displays, you can also zoom the display interactively using the + and - keys, if the keys associated with the display have not been disabled using MdispControl() with M_KEYBOARD_USE.

Note that the window must have the focus for the keys to work. To give focus to an exclusive display, you must permit the mouse cursor to move over the display, using MdispControl() with M_RESTRICT_CURSOR.

For windowed and exclusive displays, once you have permitted the mouse cursor to move over the display, you can use the mouse wheel to zoom in or out of the image interactively; to do so, scroll the wheel up or down, respectively.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
DisplayId

Specifies the identifier of the display.

XFactor INQ

Specifies the zoom factor for the X-direction of the display. This parameter must be set to one of the following values:

function map For specifying the zoom factor in the X-direction
CollapseValue Description
Collapse Value > 0.0

Specifies the zoom factor for the X-direction of the display. A value greater than 1.0 will zoom in, while a factor less than 1.0 will zoom out.

(summarize)
YFactor INQ

Specifies the zoom factor for the Y-direction of the display. This parameter must be set to one of the following values:

function map For specifying the zoom factor in the Y-direction
CollapseValue Description
Collapse Value > 0.0

Specifies the zoom factor for the Y-direction of the display. A value greater than 1.0 will zoom in, while a factor less than 1.0 will zoom out.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll; mildisplay.dll.