summaryrefslogtreecommitdiff
path: root/FL/Fl_SVG_Image.H
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-06-15 19:05:34 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-06-15 19:05:47 +0200
commit46b89686df06102af64454bc7b2e722c1ff16927 (patch)
tree8e73dc3298cb6a24069c8f2fd8abedb7f71e9ca0 /FL/Fl_SVG_Image.H
parent91b78572c7ab2e4bd7692d2aa5352fcbbb33b236 (diff)
Allow using an Fl_SVG_Image object as window icon.
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
Diffstat (limited to 'FL/Fl_SVG_Image.H')
-rw-r--r--FL/Fl_SVG_Image.H4
1 files changed, 3 insertions, 1 deletions
diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H
index 3b9648e3a..4940ffb8c 100644
--- a/FL/Fl_SVG_Image.H
+++ b/FL/Fl_SVG_Image.H
@@ -31,7 +31,7 @@ struct NSVGimage;
if the file could not be opened or read, and ERR_FORMAT if the SVG format could not be decoded.
If the image has loaded correctly, w(), h(), and d() should return values greater than zero.
- Rasterization is not done until the image is first drawn or resize() is called. Therefore,
+ Rasterization is not done until the image is first drawn or resize() or normalize() is called. Therefore,
\ref array is NULL until then. The delayed rasterization ensures an Fl_SVG_Image is always rasterized
to the exact screen resolution at which it is drawn.
@@ -161,6 +161,8 @@ public:
virtual void color_average(Fl_Color c, float i);
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
+ virtual Fl_SVG_Image *as_svg_image() { return this; };
+ virtual void normalize();
};
#endif // FL_SVG_IMAGE_H