33 friend class Fl_Graphics_Driver;
43 int cache_w_, cache_h_;
49 Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {
data((
const char **)&array, 1);}
53 Fl_Image(W,H,0), array((const
uchar *)bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {
data((
const char **)&array, 1);}
55 Fl_Bitmap(
const char *bits,
int bits_length,
int W,
int H);
60 void draw(
int X,
int Y) {
draw(X, Y,
w(),
h(), 0, 0);}
64 int cache_w() {
return cache_w_;}
65 int cache_h() {
return cache_h_;}
Fl_Image, Fl_RGB_Image classes.
The Fl_Bitmap class supports caching and drawing of mono-color (bitmap) images.
Definition: Fl_Bitmap.H:32
const uchar * array
pointer to raw bitmap data
Definition: Fl_Bitmap.H:36
Fl_Bitmap(const char *bits, int W, int H)
The constructors create a new bitmap from the specified bitmap data.
Definition: Fl_Bitmap.H:52
int alloc_array
Non-zero if array points to bitmap data allocated internally.
Definition: Fl_Bitmap.H:38
Fl_Bitmap(const uchar *bits, int W, int H)
The constructors create a new bitmap from the specified bitmap data.
Definition: Fl_Bitmap.H:48
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:60
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Draws the image to the current drawing surface with a bounding box.
Definition: Fl_Image.cxx:62
const char *const * data() const
Returns a pointer to the current image data array.
Definition: Fl_Image.H:191
int w() const
Returns the current image drawing width in FLTK units.
Definition: Fl_Image.H:131
Fl_Image * copy() const
Creates a copy of the image in the same size.
Definition: Fl_Image.H:266
virtual void label(Fl_Widget *w)
This method is an obsolete way to set the image attribute of a widget or menu item.
Definition: Fl_Image.cxx:163
int h() const
Returns the current image drawing height in FLTK units.
Definition: Fl_Image.H:137
virtual void uncache()
If the image has been cached for display, delete the cache data.
Definition: Fl_Image.cxx:59
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition: fl_attr.h:46
unsigned char uchar
unsigned char
Definition: fl_types.h:30