Skip to content

Commit

Permalink
OS X Quartz: fixed issues with creating a gray image map. Fluid probl…
Browse files Browse the repository at this point in the history
…ems still appear.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Jun 5, 2006
1 parent c80ca69 commit 9c0a2c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/fl_draw_image_mac.cxx
Expand Up @@ -178,7 +178,11 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
linedelta = W;
}
// create an image context
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
CGColorSpaceRef lut = 0;
if (delta<=2)
lut = CGColorSpaceCreateDeviceGray();
else
lut = CGColorSpaceCreateDeviceRGB();
CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, linedelta*H*delta, 0L);
CGImageRef img = CGImageCreate( W, H, 8, 8*delta, linedelta*delta,
lut, delta&1?kCGImageAlphaNone:kCGImageAlphaNoneSkipLast,
Expand Down
2 changes: 1 addition & 1 deletion test/symbols.cxx
Expand Up @@ -115,7 +115,7 @@ bt("@arrow");
bt("@returnarrow");
bt("@square");
bt("@circle");
bt("@00010line");
bt("@line");
bt("@menu");
bt("@UpArrow");
bt("@DnArrow");
Expand Down

0 comments on commit 9c0a2c0

Please sign in to comment.