From dcaf20123977300bc3429613a10a70315d370eb4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 12 Apr 2018 15:51:50 +0000 Subject: 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 --- src/Fl_SVG_Image.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Fl_SVG_Image.cxx') 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 -- cgit v1.2.3