Display

xcall AUI, AUI_IMAGE, IMGOP_DISPLAY, handle, status, strow, stcol, erow, ecol, flags

IMGOP_DISPLAY displays the image (identified by handle) in the position specified by the starting row/column and ending row/column parameters. The image will be automatically scaled to fit in the allotted space, although by default the aspect ratio is preserved. So, for example, if the actual image is square, and you specify coordinates that mark out an elongated rectangle, not all of the space will be used for the image.

flags allows you to specify certain display options, such as whether to stretch the image to fit exactly in the space provided or to preserve its aspect ratio. See Open and Display for flags definitions.

The first two values apply only to printing. If IMGF_STRETCH  is specified, the aspect ratio is not preserved and the image is stretched as needed to completely fill the specified display rectangle. IMGF_SCALEQ forces us to use linear bitwise interpolation (as opposed to simple bit replication) during scaling, which theoretically will achieve a higher quality, less "blocky" image when enlarging beyond the original image size.

The image display will overwrite any screen text that it overlaps, and is not affected by other screen operations such as clearing the screen or saving/restoring the screen. The only way to remove it from the screen is with opcode 2 or opcode 6.

Images in Dialogs

If a modal dialog is active when the image is displayed, it will be displayed within, and relative to the dialog. If the coordinates given exceed the size of the dialog, the image will be trimmed to the borders of the dialog. This is one good way to display the kinds of horizontal and vertical banner images which are often used in "wizard" dialogs.