class Fl_Image
#include <FL/Fl_Image.H>
This object encapsulates a full-color RGB image, and allows you to
make an Fl_Object use a Image as a label, or to just draw the Image
directly. Under X it will create an offscreen pixmap the first
time it is drawn, and copy this each subsequent time it is drawn.
See fl_draw_image() for what
happens. On 8 bit screens dithering is used.
Fl_Image(char uchar *data, int W, int H, int D=3, int LD=0);
Construct from a pointer to RGB data. W and H are the size of the
image in pixels. D is the delta between pixels (it may be more than 3
to skip alpha or other data, or negative to flip the image
left/right). LD is the delta between lines (it may be more than D*W
to crop images, or negative to flip the image vertically). The data
pointer is simply copied to the object, so it must point at persistent
storage.
~Fl_Image()
The destructor will destroy any X pixmap created. It does not do
anything to the data.
void fl_draw(Fl_Image *b,int x,int y,int w,int h);
Draw the Image centered in (and possibly clipped to) the given
bounding box.
void Fl_Image::label(Fl_Object *);
Change the label() and the labeltype() of the object to draw the
Image. You can use the same Image for many objects.
(back to contents)