• 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: Drawing gradients in views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing gradients in views


  • Subject: Re: Drawing gradients in views
  • From: Brock Brandenberg <email@hidden>
  • Date: Tue, 28 Jan 2003 08:27:25 -0600

> Does anyone know if it possible to fill an NSRect with a gradient. I
> envision creating a rectangle that looks like the ones in iCal, they
> have that smooth color gradient. I have figured out how to create
> shadows for my rectangles, but don't know how to do a gradient.
>
> Also, I have tried to figure out how to draw a rect with rounded
> corners but haven't had any luck. I found this
> http://lists.apple.com/archives/cocoa-dev/2001/Aug/28/
> drawingroundedrect.002.txt in the archives, but it didn't work for me.
> My rectangles weren't rectangles at all!
>
> Any help would be appreciated.

There are CoreGraphics functions for this now under Jaguar. Look at
CGShading.h and under "What's New in Quartz2D" in the docs.

Brock Brandenberg

----- industrial design @ www.bergdesign.com ------
_______________________________________________
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.

  • Prev by Date: Re: NSView doesnt receive mouseMoved events?
  • Next by Date: Re: FindFolder() and Cocoa
  • Previous by thread: Re: Drawing gradients in views
  • Next by thread: Re: Drawing gradients in views
  • Index(es):
    • Date
    • Thread