-------------------------X11 BITMAP (.xbm) IMAGE FORMAT------------------------- -------------------------------------------------------------------------------- X11 bitmaps are black-and-white raster images stored as fragments of C source code. Each code fragment defines two preprocessor directives, ``IMAGE_width'' (which evaluates to the width of the image) and ``IMAGE_height'' (which evaluates to the height of the image), and an array of unsigned chars (usually declared with the ``static'' storage-class specifier) named ``IMAGE_bits'' in which the contents of the image are stored (``IMAGE'' here represents the basename of the image file). If the image is meant for use as a pointer icon, two additional preprocessor directives are defined: ``IMAGE_x_hot'' and ``IMAGE_y_hot'', which evaluate to the x- and y-coordinates, respectively, of the pointer's "hot spot." The coordinate system used for these directives has the pixel in the upper-left corner of the image as the origin, with the x-axis increasing to the right and the y-axis increasing downwards. Within ``IMAGE_bits'', each row of the image is represented by one or more bytes in which each bit corresponds to a pixel from the row, from left to right, stored in successive bytes from the least significant bit to the most significant bit. An unset bit represents white, and a set bit represents black. If the width of the image is not a multiple of eight, the remaining bits in the last byte for each row are left unset. Each row in an image is represented by the same number of bytes, which is as small as possible, and the rows are stored in the array contiguously from top to bottom.