summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-08-25 18:04:56 +0000
committerManolo Gouy <Manolo>2017-08-25 18:04:56 +0000
commita57381e8042d45384b2f502146c6418294ad1334 (patch)
treea95bc1713f7e3109e2132b27115ef6a472655758
parent86e60e906893a485952e20e04ef429082f99be80 (diff)
Fl_Scalable_Graphics_Driver::draw(Fl_RGB_Image *,...) : change how the current scaling factor is taken into account.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12400 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Graphics_Driver.cxx2
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index f5da1b4a8..6ac49b196 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -337,9 +337,7 @@ void Fl_Scalable_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP
}
if (scale() != 1 && can_do_alpha_blending()) { // try and use the system's scaled image drawing
push_clip(XP, YP, WP, HP);
- Fl_Region r = scale_clip(scale_);
int done = draw_scaled(img, XP-cx, YP-cy, img->w(), img->h());
- unscale_clip(r);
pop_clip();
if (done) return;
}
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index c888f4608..0a487daa5 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -851,9 +851,11 @@ int Fl_Xlib_Graphics_Driver::scale_and_render_pixmap(Fl_Offscreen pixmap, int de
fprintf(stderr, "Failed to create Render pictures (%lu %lu)\n", src, dst);
return 0;
}
+ Fl_Region r = scale_clip(scale_);
const Fl_Region clipr = clip_region();
if (clipr)
XRenderSetPictureClipRegion(fl_display, dst, clipr);
+ unscale_clip(r);
if (scale_x != 1 || scale_y != 1) {
XTransform mat = {{
{ XDoubleToFixed( scale_x ), XDoubleToFixed( 0 ), XDoubleToFixed( 0 ) },