From c646ecc0d3e7a2d8385b3fd909f0c08875570807 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 1 Mar 2016 15:22:37 +0000 Subject: 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 --- src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/drivers') 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) { -- cgit v1.2.3