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: Alpha for Carbon window...



Thanks again Scott,

So there's no way to say "Use this pixmap as the alpha channel of my window" and have the window Mgr do the compositing/blending magic?


Not that I'm aware of. You might be able to do something with CreateCGImageFromPixMaps, but I don't know of any way to set up the windowin such a way that you specify the alpha channel and have the OS use only the color channels when drawing.

So there is no way to "set" an alpha channel that will persist indefinitely (or at least until I change it) as the alpha mask of a window?

If not, does that mean that on every update/paint I have to supply the alpha as well as the rgb?


If you draw into the window with QuickDraw it will set the alpha channel to fully opaque for every pixel you touch.

I'll be setting pixels manually... no quickdraw calls, no CG calls, etc.. both alpha and rgb.



If so, my C++ offscreen abstraction works with GWorlds. I presume I can make another subclass of that to work with CGContexts? Basically I just need the base address and rowbytes, etc...

When you get the paint event it will pass you a CGContext as a parameter to use. If you want to use CG to draw into any other GWorld you can use QDBeginCGContext to create a CG context... Draw your stuff and end it with a call to QDEndCGContext. (don't use QuickDraw calls between the Begin and End context calls).

Hmm.. I'm still not clear on that. If I'm passed a CGContext can I get the baseAddress and rowBytes (or similar) of the CGContext - or somehow else manually manipulate the raw pixels of the CGContext?

thx,
ando
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Alpha for Carbon window... (From: Ando Sonenblick <email@hidden>)
 >Re: Alpha for Carbon window... (From: Ricky Sharp <email@hidden>)
 >Re: Alpha for Carbon window... (From: Scott Thompson <email@hidden>)
 >Re: Alpha for Carbon window... (From: Ando Sonenblick <email@hidden>)
 >Re: Alpha for Carbon window... (From: 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.