Imagemask – AMT Datasouth PAL User Manual
Page 121

115
imagemask
imagemask
Description
Draws a rasterized image.
Usage
WNum HNum PolBool TmArray SrcProc
imagemask
WNum
Integer. Width of source raster image in pixels.
HNum
Integer. Height of source raster image in pixels.
PolBool
Boolean. true indicates positive image polarity. false indicates negative image
polarity. For positive image polarity, image bits with a value of one indicate
black pixels. Image bits with a value of zero indicate white pixels. For negative
image polarity, image bits with a value of zero indicate black pixels. Image bits
with a value of one indicate white pixels.
TmArray
Array. Specifies the source raster image's transformation matrix. At this time, the
programmer should only specify this array as follows.
[
WNum
0 0 -
HNum
0
HNum
]
WNum
Integer. Same as the width of the source raster image in pixels.
-
HNum
Integer. Negative height of the source raster image in pixels.
HNum
Integer. Same as the height of the source raster image in pixels.
SrcProc
Procedure. Procedure which supplies the source data for the raster image. PAL
continues to execute this procedure until the procedure returns sufficient data to
complete the raster image. The WNum and HNum parameters establish the
amount of data required to complete the raster image.
Comments
The interpreter relies upon the specified procedure to supply the data for the raster image. Once the
interpreter executes the procedure, the procedure must place a string object onto the stack before
terminating. Upon termination of the procedure, the interpreter recovers the string object from the
stack and appends the data to any previous string objects returned by the procedure.
The interpreter will continue to execute the procedure until the procedure has returned sufficient
data to complete the raster image. PAL determines the amount of data necessary for the raster
image from the WNum and HNum parameters.
PAL has a standardized format for representing the raster data within the strings return by the
procedure. A raster image consists of an array of bits. Each bit specifies the color of a single pixel.
As discussed above, the PolBool parameter specifies the association between bit values and colors.
The first bit of the first byte returned by the procedure specifies the color of the top left pixel of the
raster image. The next bit specifies the color of the next pixel to the right. Each successive bit