summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-01 15:22:37 +0000
committerManolo Gouy <Manolo>2016-03-01 15:22:37 +0000
commitc646ecc0d3e7a2d8385b3fd909f0c08875570807 (patch)
treed5b341332b2de01c721e75c5a37ffff672d347d0 /src/drivers/Quartz
parent95824506fe2f410e1cd37e9d2bed58af6f558a0a (diff)
Have fl_draw_image(buf,X,Y,W,H,D,L) support negative D and/or L arguments on Mac OS X - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz')
-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) {