58 static const int ERR_NO_IMAGE = -1;
59 static const int ERR_FILE_ACCESS = -2;
60 static const int ERR_FORMAT = -3;
63 int w_, h_, d_, ld_, count_;
64 const char *
const *data_;
76 void w(
int W) {w_ = W;}
80 void h(
int H) {h_ = H;}
84 void d(
int D) {d_ = D;}
96 void ld(
int LD) {ld_ = LD;}
100 void data(
const char *
const *p,
int c) {data_ = p; count_ = c;}
101 void draw_empty(
int X,
int Y);
103 static void labeltype(
const Fl_Label *lo,
int lx,
int ly,
int lw,
int lh,
Fl_Align la);
104 static void measure(
const Fl_Label *lo,
int &lw,
int &lh);
111 int w()
const {
return w_;}
115 int h()
const {
return h_;}
121 int d()
const {
return d_;}
126 int ld()
const {
return ld_;}
138 const char *
const *
data()
const {
return data_;}
142 virtual Fl_Image *copy(
int W,
int H);
151 virtual void color_average(
Fl_Color c,
float i);
161 virtual void desaturate();
175 virtual void draw(
int X,
int Y,
int W,
int H,
int cx=0,
int cy=0);
180 void draw(
int X,
int Y) {
draw(X, Y, w(), h(), 0, 0);}
181 virtual void uncache();
207 static size_t max_size_;
219#if defined(__APPLE__) || defined(WIN32)
232 virtual Fl_Image *copy(
int W,
int H);
233 Fl_Image *copy() {
return copy(w(), h()); }
234 virtual void color_average(
Fl_Color c,
float i);
235 virtual void desaturate();
236 virtual void draw(
int X,
int Y,
int W,
int H,
int cx=0,
int cy=0);
237 void draw(
int X,
int Y) {
draw(X, Y, w(), h(), 0, 0);}
240 virtual void uncache();
This file contains type definitions and general enumerations.
unsigned Fl_Align
FLTK type for alignment control.
Definition: Enumerations.H:826
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition: Enumerations.H:932
Fl_RGB_Scaling
The scaling algorithm to use for RGB images.
Definition: Fl_Image.H:37
@ FL_RGB_SCALING_NEAREST
default RGB image scaling algorithm
Definition: Fl_Image.H:38
@ FL_RGB_SCALING_BILINEAR
more accurate, but slower RGB image scaling algorithm
Definition: Fl_Image.H:39
The MSWindows-specific graphics class.
Definition: Fl_Device.H:459
The graphics driver used when printing on MSWindows.
Definition: Fl_Device.H:492
Fl_Fontsize size()
see fl_size().
Definition: Fl_Device.H:390
Base class for image caching and drawing.
Definition: Fl_Image.H:55
int count() const
The count() method returns the number of data values associated with the image.
Definition: Fl_Image.H:133
void d(int D)
Sets the current image depth.
Definition: Fl_Image.H:84
void draw(int X, int Y)
Draws the image.
Definition: Fl_Image.H:180
void data(const char *const *p, int c)
Sets the current array pointer and count of pointers in the array.
Definition: Fl_Image.H:100
const char *const * data() const
Returns a pointer to the current image data array.
Definition: Fl_Image.H:138
void h(int H)
Sets the current image height in pixels.
Definition: Fl_Image.H:80
int w() const
Returns the current image width in pixels.
Definition: Fl_Image.H:111
void ld(int LD)
Sets the current line data size in bytes.
Definition: Fl_Image.H:96
Fl_Image * copy()
The copy() method creates a copy of the specified image.
Definition: Fl_Image.H:150
void w(int W)
Sets the current image width in pixels.
Definition: Fl_Image.H:76
int ld() const
Returns the current line data size in bytes.
Definition: Fl_Image.H:126
void inactive()
The inactive() method calls color_average(FL_BACKGROUND_COLOR, 0.33f) to produce an image that appear...
Definition: Fl_Image.H:160
int h() const
Returns the current image height in pixels.
Definition: Fl_Image.H:115
int d() const
Returns the current image depth.
Definition: Fl_Image.H:121
The Fl_Pixmap class supports caching and drawing of colormap (pixmap) images, including transparency.
Definition: Fl_Pixmap.H:41
The Mac OS X-specific graphics class.
Definition: Fl_Device.H:421
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:202
const uchar * array
Points to the start of the object's data array.
Definition: Fl_Image.H:212
static size_t max_size()
Returns the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
Definition: Fl_Image.H:255
int alloc_array
If non-zero, the object's data array is delete[]'d when deleting the object.
Definition: Fl_Image.H:215
static void max_size(size_t size)
Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
Definition: Fl_Image.H:250
The Xlib-specific graphics class.
Definition: Fl_Device.H:507
void draw(const char *str, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
unsigned char uchar
unsigned char
Definition: fl_types.h:30
This struct stores all information for a text or mixed graphics label.
Definition: Fl_Widget.H:65