OS X Quartz: fixed issues with creating a gray image map. Fluid problems still appear.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-06-05 11:59:09 +00:00
parent c80ca69407
commit 9c0a2c0a0f
2 changed files with 6 additions and 2 deletions

View File

@ -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,

View File

@ -115,7 +115,7 @@ bt("@arrow");
bt("@returnarrow");
bt("@square");
bt("@circle");
bt("@00010line");
bt("@line");
bt("@menu");
bt("@UpArrow");
bt("@DnArrow");