| Customize Help
| Save Settings

MdispPan



Function Map
Synopsis
Pan (scroll) a display.
Syntax
void MdispPan(
MIL_ID DisplayId, //in
MIL_DOUBLE XOffset, //in
MIL_DOUBLE YOffset //in
)
Description

This function associates X- and Y-panning offsets with the specified display. When an image buffer is selected for display, the image is displaced on the display, from the top-left corner of the window (for windowed displays) or the screen (for exclusive displays), according to these offsets.

Note, the offsets (XOffset and YOffset) are in image pixels. Since the current zoom factors affect the displayed size of an image pixel, the panning offsets are also affected by the zoom factors. For example, if the display has an associated X-zoom factor of 4, panning by an X-offset of one image pixel results in panning by 4 pixels in the horizontal direction on the display.

To center the selected image buffer in the display, use MdispControl() with M_CENTER_DISPLAY, instead of using MdispPan().

For windowed and exclusive displays, you can also pan the display interactively using the Page-up/down and arrow keys, if the keys associated with the display have not been disabled using MdispControl() with M_KEYBOARD_USE. You can also pan the display by clicking on the image and dragging in the required direction with the mouse, if the mouse associated with the display has not been disabled using MdispControl() with M_MOUSE_USE. Note that these features are not enabled by default when using a user-defined window.

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.

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.

XOffset INQ

Specifies the number of image pixels by which to pan an image buffer horizontally when it is displayed. Specify the offset relative to the top-left corner of the image buffer. Specify a positive offset value to displace the image to the left.

YOffset INQ

Specifies the number of image pixels by which to pan an image buffer vertically when it is displayed. Specify the offset relative to the top-left corner of the image buffer. Specify a positive offset value to displace the image upwards.

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