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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to