Previous IDL Reference Guide: IDL Direct Graphics Devices Next

Devices with Scalable Pixels

For most direct graphics display devices, pixels are of a fixed size and the number of pixels available depends on the display resolution of the device. For such devices, the array of pixels written to the screen will be the same size as the image array.

Some direct graphics devices have the ability to place an image with any number of pixels into an area of arbitrary size. Such devices are said to have scalable pixels, because there is no direct connection between the number of pixels in the image and the physical space it occupies in the displayed image. The Computer Graphics Metafile (CGM) and PostScript (PS) devices fall into this category.

When the current image device has scalable pixels, IDL sets the first bit of the !D.FLAGS system variable field. The following IDL statement can be used to determine if the current device has scalable pixels:


SP will be nonzero if the device has scalable pixels. When displaying an image on a device with scalable pixels, the default is to use the entire display surface for the image. The XSIZE and YSIZE keywords can be used to override this default and specify the width and height of the desired display area.

The XSIZE and YSIZE keywords should also be used when positioning images with the Position argument to the TV or TVSCL routines. The Position argument normally uses the size of the image in pixels to determine the placement of the image, but this is not possible for devices with scalable pixels. Instead, the default for such devices is to fill the entire available display area. However, if XSIZE and YSIZE are specified along with the Position argument, TV or TVSCL will use them to determine image placement.

  IDL Online Help (June 16, 2005)