Contents Up Previous Next

Bitmap

A bitmap is a rectangular array of pixels, possibly in colour. A bitmap can be created in memory, or loaded from an XBM file under X, or BMP file under Windows.

A bitmap can be drawn on a canvas by selecting it into a memory-dc object and using dc-blit. Bitmaps can also be used to create buttons; see button-create-from-bitmap.

bitmap-create
bitmap-delete
bitmap-get-colourmap
bitmap-get-height
bitmap-get-width
bitmap-load-from-file


bitmap-create

long ( bitmap-create float width float height optional int depth)

Creates a bitmap in memory. The programmer can draw into the bitmap by selecting it into a memory device context, for later drawing on an output device context such as a canvas device context.


bitmap-delete

long ( bitmap-delete long bitmap-id)

Deletes the given bitmap.


bitmap-get-colourmap

long ( bitmap-get-colourmap long id)

Gets the colourmap associated with the bitmap; if none, zero will be returned.


bitmap-get-height

long ( bitmap-get-height long id)

Gets the height of the bitmap.


bitmap-get-width

long ( bitmap-get-width long id)

Gets the width of the bitmap.


bitmap-load-from-file

long ( bitmap-load-from-file string file optional word bitmap-type)

Loads a bitmap from a file, and returns a new bitmap identifier.

bitmap-type specifies the type of bitmap to be loaded, and may be one of:

Note that whether any of these formats are available depends on how wxCLIPS was compiled.