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...



On 7/28/04 10:53 AM, Ando Sonenblick didst favor us with:

> Scott,
>
> Again thanks for the insight. I'm pretty sure I understand.
>
>
>> I *think* that you can directly access the pixels through the GWorld's
>> baseAddress then. If that doesn't work then you can set up the the
>> pixel image in your own pixel buffer and create a CGImage from that
>> pixel buffer then use Quartz to draw that image into your window.
>
> I'm currently doing all my drawing into an offscreen gworld, then
> copybitsing into the window on updates/draws. No alpha involved.
>
> Seems to me that I need only to change my window from an old style
> window, to a new overlay window, do my offscreen drawing, then set the
> alpha of my gworld, and then use copybits (or CGImage) to copy the full
> argb pixels to the window/CGContext.
>
> Will that work?

No. As Scott explained previously, once you draw to a pixel with QuickDraw,
it will be opaque. The window alpha will apply, so all of those "opaque"
pixels will have the same level of transparency when you look at the window.
To do what you indicate you want to do, which is have some pixels more
opaque than others, you will have to do your drawing in the window with Core
Graphics.

Also, I don't know exactly how you plan to use this, but I'm not aware of
any reason any of this is limited to overlay windows.

Larry
_______________________________________________
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: 
 >Re: Alpha for Carbon window... (From: Ando Sonenblick <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.