diff options
| author | Manolo Gouy <Manolo> | 2018-04-12 15:51:50 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-04-12 15:51:50 +0000 |
| commit | dcaf20123977300bc3429613a10a70315d370eb4 (patch) | |
| tree | 27b779d1db08f97d77b0b197a4247854b5bcc61e /src/Fl_SVG_Image.cxx | |
| parent | 178343b2ee6f674d6bdb75f5e039557ea811f40a (diff) | |
SVG support: improve printed SVG images by increasing the resolution when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 66885493f..22579c898 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -234,7 +234,9 @@ void Fl_SVG_Image::resize(int width, int height) { void Fl_SVG_Image::draw(int X, int Y, int W, int H, int cx, int cy) { - float f = Fl::screen_driver()->retina_factor() * fl_graphics_driver->scale(); + float f = fl_graphics_driver->scale(); + if (fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) f *= 2; + else f *= Fl::screen_driver()->retina_factor(); int w1 = w(), h1 = h(); /* When f > 1, there may be several pixels per FLTK unit in an area of size w() x h() of the display. This occurs, e.g., with Apple retina displays |
