Author: manolo Date: 2012-05-09 08:30:52 -0700 (Wed, 09 May 2012) New Revision: 9476 Log: Fixed clip problem because of group-relative coordinates when drawing RGB images. The problem was that function innards() of file draw_image.cxx receives window-relative coordinates as arguments, so it must convert them to group-relative before calling fltk3::clip_box(). Without this fix, under X11, the RGB image of the device test program disappears when the "Print" button is pressed.
Modified: branches/branch-3.0/src/fltk3/draw_image.cxx Modified: branches/branch-3.0/src/fltk3/draw_image.cxx =================================================================== --- branches/branch-3.0/src/fltk3/draw_image.cxx 2012-05-09 15:19:24 UTC (rev 9475) +++ branches/branch-3.0/src/fltk3/draw_image.cxx 2012-05-09 15:30:52 UTC (rev 9476) @@ -465,8 +465,10 @@ if (!linedelta) linedelta = W*delta; int dx, dy, w, h; - fltk3::clip_box(X,Y,W,H,dx,dy,w,h); + fltk3::clip_box(X-fltk3::graphics_driver->origin_x(),Y-fltk3::graphics_driver->origin_y(),W,H,dx,dy,w,h); if (w<=0 || h<=0) return; + dx += fltk3::graphics_driver->origin_x(); + dy += fltk3::graphics_driver->origin_y(); dx -= X; dy -= Y; _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
