Re: Irregular shaped windows
Re: Irregular shaped windows
- Subject: Re: Irregular shaped windows
- From: Daniel Hedrick <email@hidden>
- Date: Fri, 14 Feb 2003 13:27:14 -0600
Sayeth David Cittadini on Sat, Feb 15, 2003 at 04:32:20AM +1100:
>
I am sure someone has asked this before but I don't know where to look
>
:-). Is there example code somewhere to show how to create irregular
>
shape windows in Cocoa? For example, the windows that you can see in
>
Konfabulator or a irregular shaped CD player that I once saw on Mac OS
>
X.
Check out the "Round Transparent Window" sample Cocoa code on
Apple's website:
http://developer.apple.com/samplecode/Sample_Code/Cocoa/RoundTransparentWindow.htm
Instead of compisiting the circleImage or pentaImage, you could
change the shape to whatever you want by compositing an arbitrary
shape (using NSBezierPath) in the view's drawRect method.
Of course, if you're irregular shape is fixed, then just build
a "mask image" similar to the circle or pentagon and composite
into that.
Thx,
-daniel
email@hidden
--
There are 10 types of people in this world...
those who understand binary, and those who don't.
_______________________________________________
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.