• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Irregular shaped windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Irregular shaped windows (From: David Cittadini <email@hidden>)

  • Prev by Date: Re: Copying PICT image
  • Next by Date: Re: Newbie Splash Screen Question
  • Previous by thread: Irregular shaped windows
  • Next by thread: Re: Irregular shaped windows
  • Index(es):
    • Date
    • Thread