Re: I need a milder application badge (solution)
Re: I need a milder application badge (solution)
- Subject: Re: I need a milder application badge (solution)
- From: Greg Guerin <email@hidden>
- Date: Sat, 25 Jul 2009 17:32:45 -0700
Jay Reynolds Freeman wrote:
Precisely! And what I am wishing for is a way to specify a window
whose
"existing color" is "transparent", so that the bitmap created will in
essence have (red, green, blue, alpha) = (0, 0, 0, 0), in locations
not otherwise explicitly drawn. If such a window appeared on the
visible
part of the screen, there would clearly be problems -- there is no
way to
draw "transparent" with nothing behind it. But for setting up
offscreen
windows for the capture of bitmaps that include transparent areas,
such
a feature would be very useful, and I would like it to be at the
window-and-view-hierarchy level of abstraction, because that is
easier to
use, particularly for ignorant beginners like me, than the compositing
level that underlies it.
Maybe you're having trouble with transparency (i.e. alpha) because
some of your view hierarchy is opaque.
Another possibility is that somehow the backing-store image you're
drawing into doesn't support alpha, so any alpha actually rendered
into its pixels is lost, leaving only a solid black color.
Or perhaps you're not initializing the backing-store image with the
correct color that has alpha=0. You should be able to paint a solid
(i.e. opaque) rectangle of rgba=0:0:0:0 and have it set every pixel
in the backing-store to that value. Subsequent elements drawn on top
of that initial "base color" would then combine using the given
compositing operation and the source and dest images.
http://en.wikipedia.org/wiki/Alpha_compositing
I also don't think you've posted the actual working code, so you
could be making a simple mistake in how the backing store is
initialized, how it's prepared for rendering, what compositing
operation is used, or something like that. If it's too complicated
to post your current code, you should make a well-isolated example
that demonstrates the problem, and post the URL for it (or if small
enough, post the source).
Without seeing actual code, I don't think much progress is going to
be made.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden