summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-03-22 17:14:37 +0000
committerManolo Gouy <Manolo>2011-03-22 17:14:37 +0000
commit16d983eab4da12b678441d498db4e438c9fe6aca (patch)
treedb545a6a6c7b6c8fba79979c19459f547923d3a7 /src
parent80fffdc3690303afe8c53a09d72ea1cedf1ba1f6 (diff)
Mac OS: correct handling of fl_draw_image() call with L > W*D when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8527 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_draw_image_mac.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fl_draw_image_mac.cxx b/src/fl_draw_image_mac.cxx
index 86a86158a..32b365b17 100644
--- a/src/fl_draw_image_mac.cxx
+++ b/src/fl_draw_image_mac.cxx
@@ -71,7 +71,11 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
cb(userdata, 0, i, W, tmpBuf+i*W*delta);
}
} else {
- memcpy(tmpBuf, buf, H*W*delta);
+ uchar *p = tmpBuf;
+ for (int i=0; i<H; i++) {
+ memcpy(p, buf+i*linedelta, W*delta);
+ p += W*delta;
+ }
}
array = (void*)tmpBuf;
linedelta = W*delta;