Transparent backgroundcolors ?
Transparent backgroundcolors ?
- Subject: Transparent backgroundcolors ?
- From: Tobias Hermann <email@hidden>
- Date: Mon, 28 Apr 2003 18:22:11 +0200
hi!
I am playing around with transparent colors and some things really seem
odd to me: (yes, I called [NSColor setIgnoresAlpha: NO];):
1. I have a brushed metal window and a control on it, e.g. an
NSTextField. When I set the backgroundColor to a semi-transparent
color, it only gets darker, but the brushed metal pattern is totally
gone. who paints the background black before the transparent background
color gets drawn ??
2. I subclassed NSView and found out the following:
When drawing the background with a transparent Color like this (within
drawRect):
[myColor set];
NSRectFill(rect);
I get the same strange result: the brushed metal surface gets overdrawn
totally, and my transparent color only gets darker and darker with
smaller alpha values...
When I do this:
[myColor set];
[NSBezierPath fillRect: rect];
it works!! I have still see the brushed metal surface, but a
semitransparent myColor lies on top of it...
And that is what I want some Cocoa Controls want to do: paint the
background semi-transparent. But i can't get it to work!!
And e.g. when I call NSTextField's setDrawsBackground:NO, i get other
sideeffects like that the editing text overdraws itself, etc...
Any hints on that ?
Thank you in advance!!
Tobi
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.