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/drivers/PostScript | |
| 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/drivers/PostScript')
| -rw-r--r-- | src/drivers/PostScript/Fl_PostScript_image.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/PostScript/Fl_PostScript_image.cxx b/src/drivers/PostScript/Fl_PostScript_image.cxx index e237b09ca..922e03e75 100644 --- a/src/drivers/PostScript/Fl_PostScript_image.cxx +++ b/src/drivers/PostScript/Fl_PostScript_image.cxx @@ -604,7 +604,7 @@ void Fl_PostScript_Graphics_Driver::draw_rgb(Fl_RGB_Image * rgb,int XP, int YP, int h = rgb->h(); mask=0; if (lang_level_>2) //when not true, not making alphamask, mixing colors instead... - if (alpha_mask(di, w, h, rgb->d(),rgb->ld())) return; //everthing masked, no need for painting! + if (alpha_mask(di, w, h, rgb->d(),rgb->ld())) return; //everything masked, no need for painting! draw_image(di, XP + cx, YP + cy, w, h, rgb->d(), rgb->ld()); delete[]mask; mask=0; @@ -621,7 +621,8 @@ int Fl_PostScript_Graphics_Driver::scale_and_draw(Fl_Image *img, int XP, int YP, clocale_printf("GS %d %d TR %f %f SC GS\n", XP, YP, float(WP)/img->data_w(), float(HP)/img->data_h()); int keep_w = img->w(), keep_h = img->h(); img->scale(img->data_w(), img->data_h(), 0, 1); - img->draw(0, 0, img->data_w(), img->data_h(), 0, 0); + if (img->as_rgb_image()) draw_rgb(img->as_rgb_image(), 0, 0, img->data_w(), img->data_h(), 0, 0); + else img->draw(0, 0, img->data_w(), img->data_h(), 0, 0); clocale_printf("GR GR\n"); img->scale(keep_w, keep_h, 0, 1); pop_clip(); // restore FLTK's clip |
