Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QDBeginCGContext, OffscreenGWorlds, and Alpha channels




On Feb 15, 2005, at 12:47 AM, R. Scott Thompson wrote:

The documentation for QDBeginCGContext contains the sentence:

"When using Quartz 2D to draw in a offscreen graphics world, alpha information is always ignored"

Obviously the computer doesn't ignore ALL alpha information. When I draw into a 32 bit offscreen GWorld, translucent graphics draw translucently, edges are antialiased, and all manner of lovely effects I commonly associate with alpha compositing occur.

Which alpha information will Quartz 2D "always ignore"?


QDBeginCGContext on a 32-bit offscreen GWorld internally ends up in a CGBitmapContextCreate() call, where the CGImageAlphaInfo parameter is set to kCGImageAlphaNoneSkipFirst, indicating that Quickdraw does not guarantee any meaningful content in the high order byte of a "XRGB" pixel.
So, the CGContextRef returned from QDBeginCGContext just behaves as any CGBitmapContext created with kCGImageAlphaNoneSkipFirst.
As you have observed, antialiasing does not require an alpha channel.

--(jm)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden

References: 
 >QDBeginCGContext, OffscreenGWorlds, and Alpha channels (From: "R. Scott Thompson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.