summaryrefslogtreecommitdiff
path: root/src/Fl_SVG_Image.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
-rw-r--r--src/Fl_SVG_Image.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx
index c4c593d0a..c76bc962b 100644
--- a/src/Fl_SVG_Image.cxx
+++ b/src/Fl_SVG_Image.cxx
@@ -266,6 +266,12 @@ void Fl_SVG_Image::color_average(Fl_Color c, float i) {
Fl_RGB_Image::color_average(c, i);
}
+/** Makes sure the object is fully initialized.
+ This function rasterizes the SVG image if that was not done before. */
+void Fl_SVG_Image::normalize() {
+ if (!array) resize(w(), h());
+}
+
#endif // FLTK_USE_NANOSVG
//