NSWindow curved shape antialiasing + shadow
NSWindow curved shape antialiasing + shadow
- Subject: NSWindow curved shape antialiasing + shadow
- From: Stamenkovic Florijan <email@hidden>
- Date: Wed, 10 Jun 2009 16:13:10 -0400
Hi all,
I am experimenting with custom shaped NSWindows, that I draw into
using NSBezierPath. Generally all is good, but there is a small
problem. If the edge of the window is defined by a curve that is
antialiased, then the shadow is drawn at the first outside pixel that
is not drawn into at all. Resulting in the window edge having
consisting of:
Opaque pixels -> Semitransparent pixels -> Opaque shadow line ->
Shadow falloff
This is irritating. I have the possibility of turning of antialiasing
for my background shape, resulting in not having semitransparent
pixels in between of the opaque background and the opaque shadow line.
This is better. However, results in rough curves...
I am looking for a way to have both (smooth curves, and a nice
shadow). What I am thinking of is putting a window with the same
shape, slightly smaller, behind my main window. And then only have the
back window draw a shadow, which would hopefully result in something
decent.
Any thoughts on this? Is there a better solution?
Thanks,
F
_______________________________________________
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