Skip to main content

MdispZoom

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Zoom a display.

Syntax

void MdispZoom(
AIL_ID DisplayId, //out
AIL_DOUBLE XFactor, //in
AIL_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.

Parameters

DisplayId (out, AIL_ID)

Specifies the identifier of the display.

XFactor (in, AIL_DOUBLE)

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

For specifying the zoom factor in the X-direction

ValueDescription
Value > 0.0Specifies 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.

YFactor (in, AIL_DOUBLE)

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

For specifying the zoom factor in the Y-direction

ValueDescription
Value > 0.0Specifies 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.
Copyright © 2026 Zebra Technologies.