8.3 Bitmaps

8.3.1 Description

A bitmap is an image whose pixels can display either of two colors or be transparent. Four things define a bitmap: a background color, a foreground color, and two bitmaps, called the source and the mask. Each of the bitmaps specifies 0/1 values for a rectangular array of pixels, and the two bitmaps must have the same dimensions. For pixels where the mask is zero, the image displays nothing, producing a transparent effect. For other pixels, the image displays the foreground color if the source data is one and the background color if the source data is zero.

In QTk, bitmaps are built by the QTk.newImage function. This function takes one parameter: a record of the form bitmap(param1:value1 ... paramX:valueX) and returns an object allowing to reference that bitmap and change it as needed. The valid parameters and methods are described below.

8.3.2 Parameters

8.3.3 Interface


Donatien Grolaux
Version 1.3.0 (20040413)