summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-01-14 14:21:01 +0000
committerManolo Gouy <Manolo>2015-01-14 14:21:01 +0000
commitae9ea6b51f1cfec29d050618955237e3892f7d71 (patch)
tree505ec45fea5ec1fd8e94def62a996d3f4a969881
parentbc8a7037ebba0fe89164aa7fb2e8099cc5507b81 (diff)
When CGBitmapContextCreate() is used with null 5th argument, it is necessary
to use CGBitmapContextGetBytesPerRow(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10518 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_cocoa.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 969edd5f5..69ffaf1d1 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4303,7 +4303,8 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
CGContextRef gc = CGBitmapContextCreate(NULL, win->w(), bt, 8, 0, cspace, kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease(cspace);
[layer renderInContext:gc]; // 10.5 // draw all title bar to bitmap
- Fl_RGB_Image *image = new Fl_RGB_Image((const uchar*)CGBitmapContextGetData(gc), win->w(), bt, 4); // 10.2
+ Fl_RGB_Image *image = new Fl_RGB_Image((const uchar*)CGBitmapContextGetData(gc), win->w(), bt, 4,
+ CGBitmapContextGetBytesPerRow(gc)); // 10.2
image->draw(x_offset, y_offset); // draw title bar to PostScript
delete image;
CGContextRelease(gc);