MIL_ID DisplayId, | //in |
MIL_DOUBLE XOffset, | //in |
MIL_DOUBLE YOffset | //in |
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 and auxiliary 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.
Note that this function is not available on network displays.
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.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll; mildisplay.dll. |