1.1 Basic elements and data structures
By convention, a bit is an element of a monochrome bitmap, or a bitmap of depth 1. Each bit of a bitmap can have a value of 0 or 1. The value of each bit affects the illumination of its associated pixel. When a bit is 0, its corresponding pixel is considered off or clear, and when it is 1, the pixel is on or set. In the Window Tool Kit, a clear bit with value 0 is usually shown as a white pixel and a set bit with value 1 is shown as a black pixel on the screen.
The Window Tool Kit provides graphics functions that set bits according to the dimensions of specified shapes, such as lines, circles, and characters. Other functions copy bits from one bitmap to another and allow you to specify how the bits are combined with boolean operations. You can make new bitmaps of any width and height; the bit is the standard unit of measurement. If you specify the width of a particular bitmap or viewport to be 300, the bitmap or viewport will be 300 bits wide.
If you choose not to display a bitmap, it has no screen location and remains hidden. A bitmap becomes visible on the screen only when it is associated with a specific screen area by means of a viewport or a window. Thus, viewports and windows are used to position and display bitmaps. All graphic and character output operations are performed on bitmaps, not on viewports or windows.
Information on creating and manipulating bitmaps is provided in Chapter 2, "Bitmaps, Viewports, and Windows".
Generated with Harlequin WebMaker