fltk::xpmImage Class Reference

Inherits fltk::Image.

List of all members.

Public Member Functions

bool fetch ()
 xpmImage (const unsigned char *const *d, const char *name=0)
 xpmImage (char **d, const char *name=0)
 xpmImage (const char *const *d, const char *name=0)

Static Public Member Functions

static bool fetch (Image &, const char *const *data)
 For xpmFileImage to reuse fetch() code.

Public Attributes

const char *const data

Detailed Description

Draws inline XPM data. This is a text-based 256-color image format designed for X11 and still very useful for making small icons, since the data can be easily inserted into your source code:

#include "image_name.xpm"
static xpmImage image_name(image_name_xpm);

FLTK recognizes a few extensions to the xpm color map: Setting the number of colors negative means the second line in the array is a "compressed" colormap, which is 4 bytes per color of character,r,g,b. If all colors are grays and there is no transparent index, it instead makes a MASK image, where black draws the current color and white is transparent, and all other grays are partially transparent. This allows you to put antialiased glyphs into images.