| Customize Help
| Save Settings

MdispZoom



Function Map
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()).

Instead of explicitly 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.

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
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
Click to summarizeValue Description
Click to summarize 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
Click to summarizeValue Description
Click to summarize 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.