diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Image.H | 5 | ||||
| -rw-r--r-- | FL/Fl_SVG_Image.H | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H index d8fac1883..b342bad83 100644 --- a/FL/Fl_Image.H +++ b/FL/Fl_Image.H @@ -392,9 +392,12 @@ public: \sa void Fl_RGB_Image::max_size(size_t) */ static size_t max_size() {return max_size_;} - /** Returns whether an image is an Fl_SVG_Image or not. + /** Returns whether an RGB image is an Fl_SVG_Image or not. This virtual method returns a pointer to the Fl_SVG_Image if this object is an instance of Fl_SVG_Image or NULL if not. */ virtual Fl_SVG_Image *as_svg_image() { return NULL; } + /** Returns whether an RGB image is an Fl_SVG_Image or not. + This virtual method returns a pointer to the Fl_SVG_Image if this object is an instance of const Fl_SVG_Image or NULL if not. */ + virtual const Fl_SVG_Image *as_svg_image() const { return NULL; } /** Makes sure the object is fully initialized. In particular, makes sure member variable \ref array is non-null. */ virtual void normalize() {} diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H index f1dd7095e..d49d1db59 100644 --- a/FL/Fl_SVG_Image.H +++ b/FL/Fl_SVG_Image.H @@ -170,6 +170,7 @@ public: void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0) override; void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } Fl_SVG_Image *as_svg_image() override { return this; } + const Fl_SVG_Image *as_svg_image() const override { return this; } void normalize() override; }; |
