summaryrefslogtreecommitdiff
path: root/src/Fl_SVG_Image.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-09-18 12:15:08 +0000
committerManolo Gouy <Manolo>2017-09-18 12:15:08 +0000
commitb258f4b0295b72bfe7774d727cca8e0911c9c0e3 (patch)
tree70b23e61709f13e02ccb6ada64c477a4b03c5946 /src/Fl_SVG_Image.cxx
parente483ee88851d466d5b184ebf334242519b90d4f9 (diff)
SVG support: avoid re-rasterizing an image that was previously rasterized at higher resolution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12460 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
-rw-r--r--src/Fl_SVG_Image.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx
index 4e4645d3f..c30227daa 100644
--- a/src/Fl_SVG_Image.cxx
+++ b/src/Fl_SVG_Image.cxx
@@ -218,6 +218,9 @@ void Fl_SVG_Image::color_average(Fl_Color c, float i) {
int Fl_SVG_Image::draw_scaled(int X, int Y, int W, int H) {
+ if (rasterized_ && raster_w_ >= W && raster_h_ >= H) {
+ return fl_graphics_driver->draw_scaled(this, X, Y, W, H);
+ }
w(W);
h(H);
draw(X, Y, W, H, 0, 0);