Apparently you should use CGColorSpaceCreateDeviceRGB(). In the documentation 
for that function, it says:

"In Mac OS X v10.4 and later, this color space is no longer device-dependent 
and is replaced by the generic counterpart—kCGColorSpaceGenericRGB—described in 
“Color Space Names”. If you use this function in Mac OS X v10.4 and later, 
colors are mapped to the generic color spaces. If you want to bypass color 
matching, use the color space of the destination context."


On Aug 12, 2010, at 6:04 PM, Matt Neuburg wrote:

> I got this line straight out of an example in the docs:
> 
> CGColorSpaceRef colorSpace =
>  CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
> 
> But the compiler won't let me say it ("error: 'kCGColorSpaceGenericRGB' is
> unavailable"). And indeed, I do see that the header calls this __IPHONE_NA,
> and yes, I'm on iOS. But the docs also say CGColorSpaceCreateWithName *is*
> available on iOS. So what names *am* I allowed to use? Or is the point that
> on iOS I just create a vanilla color space and assign my own name?

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to