6.0

Table Of Contents
147
Arguments
string — String value containing either the name of the bitmap resource within the document, or the path
to a bitmap file.
resolution — Integer value specifying the resolution, in pixels per inch, at which the bitmap displays. A
larger number yields a smaller, clearer image, since more pixels are squeezed into a smaller space. But the
bitmap then requires more memory. Except in some very specific applications, it is rarely desirable to use
resolutions exceeding 100 ppi.
width, height — Measure values specifying the width/height, in inches, the bitmap occupies when it
displays. Specifying a value of zero for one but not both of the two dimensions scales the bitmap to fit the
non-zero dimension. Specifying both a width and a height scales the bitmap to the best fit possible with
that width and height, while maintaining its aspect ratio. Specifying both a width and a height of zero
displays the bitmap at its default resolution.
transparent — Boolean value specifying whether part of the bitmap is transparent. When set to true, the
bitmap image is combined with the background; otherwise it is pasted on top.
duotone — Colour array specifying the colour to paint all non-white pixels in the bitmap.
Code Sample Examples
Example 1 displays the bitmap image street_photo at a resolution of 72 pixels per inch, and a width of 1
inch, as a transparent bitmap image with non-white pixels set to blue.
Example 2 displays the bitmap image sunset at a resolution of 300 pixels per inch.
Example 3 prints either an image, or, if the image cannot be found, the pathname to the image.
Example 1
showbitmap('street_photo',72,1,0,true,[100,100,0,0])
Example 2
showbitmap('sunset',300,0,0)
Example 3
define( &image_paths, directory, 'c:\\images\\*.JPG' )
define( &i, integer, 1 )
if( resourcetype( &image_paths[&i] ) <> 0 )
showbitmap( &image_paths[&i], 300, 0, 0)
crlf( bitmapheight( &image_paths[&i] ) )
elseif()
show( &image_paths[&i] )
crlf( 0.16 )