summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
index daf26951c..f06333daf 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
@@ -55,8 +55,12 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
{
if (!linedelta) linedelta = W*abs(delta);
- const void *array = buf;
uchar *tmpBuf = 0;
+ if (!cb) {
+ if (delta < 0) buf -= (W-1)*(-delta);
+ if (linedelta < 0) buf -= (H-1)*abs(linedelta);
+ }
+ const void *array = buf;
if (cb || Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) {
tmpBuf = new uchar[ H*W*abs(delta) ];
if (cb) {