New public static variable bool Fl_Image::register_images_done
Allows an app to detect whether fl_register_images() was called or not.
This commit is contained in:
parent
fbf20b7225
commit
325c4b8666
@ -226,6 +226,7 @@ public:
|
||||
static void scaling_algorithm(Fl_RGB_Scaling algorithm) {scaling_algorithm_ = algorithm; }
|
||||
/** Gets what algorithm is used when resizing a source image to draw it. */
|
||||
static Fl_RGB_Scaling scaling_algorithm() {return scaling_algorithm_;}
|
||||
static bool register_images_done;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -297,6 +297,8 @@ int Fl_Image::draw_scaled(int X, int Y, int W, int H) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** True after fl_register_images() was called, false before */
|
||||
bool Fl_Image::register_images_done = false;
|
||||
|
||||
//
|
||||
// RGB image class...
|
||||
|
||||
@ -57,6 +57,7 @@ static Fl_Image *fl_check_images(const char *name, uchar *header, int headerlen)
|
||||
*/
|
||||
void fl_register_images() {
|
||||
Fl_Shared_Image::add_handler(fl_check_images);
|
||||
Fl_Image::register_images_done = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user