diff options
Diffstat (limited to 'src/drivers/Cairo')
| -rw-r--r-- | src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx index 3ad9a0d88..926121bdb 100644 --- a/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx +++ b/src/drivers/Cairo/Fl_X11_Cairo_Graphics_Driver.cxx @@ -48,8 +48,13 @@ void Fl_X11_Cairo_Graphics_Driver::scale(float f) { } -void Fl_X11_Cairo_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) { - XCopyArea(fl_display, pixmap, fl_window, (GC)Fl_Graphics_Driver::default_driver().gc(), int(srcx*scale()), int(srcy*scale()), int(w*scale()), int(h*scale()), int(x*scale()), int(y*scale())); +void Fl_X11_Cairo_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, + Fl_Offscreen pixmap, int srcx, int srcy) { + cairo_matrix_t mat; + if (cairo_) cairo_get_matrix(cairo_, &mat); + else cairo_matrix_init_identity(&mat); + XCopyArea(fl_display, pixmap, fl_window, (GC)Fl_Graphics_Driver::default_driver().gc(), int(srcx*scale()), int(srcy*scale()), int(w*scale()), int(h*scale()), + int(x*scale()) + mat.x0, int(y*scale()) + mat.y0); } |
