summaryrefslogtreecommitdiff
path: root/src/drivers
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/drivers
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/drivers')
-rw-r--r--src/drivers/PostScript/Fl_PostScript_image.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/PostScript/Fl_PostScript_image.cxx b/src/drivers/PostScript/Fl_PostScript_image.cxx
index 4b3d316bb..579375ebc 100644
--- a/src/drivers/PostScript/Fl_PostScript_image.cxx
+++ b/src/drivers/PostScript/Fl_PostScript_image.cxx
@@ -608,7 +608,8 @@ int Fl_PostScript_Graphics_Driver::draw_scaled(Fl_Image *img, int XP, int YP, in
push_no_clip(); // remove the FLTK clip that can't be rescaled
clocale_printf("%d %d %i %i CL\n", X, Y, W, H);
clocale_printf("GS %d %d TR %f %f SC GS\n", XP, YP, float(WP)/img->w(), float(HP)/img->h());
- img->draw(0, 0, img->w(), img->h(), 0, 0);
+ if (img->as_rgb_image()) draw(img->as_rgb_image(), 0, 0, img->w(), img->h(), 0, 0);
+ else img->draw(0, 0, img->w(), img->h(), 0, 0);
clocale_printf("GR GR\n");
pop_clip(); // restore FLTK's clip
return 1;