FROM : John C. Randolph
DATE : Tue Jan 28 21:58:19 2003
On Monday, January 27, 2003, at 06:52 PM, Ian G. Gillespie wrote:
> 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.
On Jaguar, take a look in the Core Graphics docs at:
file:///Developer/Documentation/CoreTechnologies/graphics/Quartz2D/
WhatsNewQuartz2D/New/CGShading/index.html
These functions will produce PDF gradients, which have the advantage
that when you go to print your view, you'll get the gradient at the
full resolution of the printer and won't see any banding.
-jcr
John C. Randolph <<email_removed>> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Tue Jan 28 21:58:19 2003
On Monday, January 27, 2003, at 06:52 PM, Ian G. Gillespie wrote:
> 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.
On Jaguar, take a look in the Core Graphics docs at:
file:///Developer/Documentation/CoreTechnologies/graphics/Quartz2D/
WhatsNewQuartz2D/New/CGShading/index.html
These functions will produce PDF gradients, which have the advantage
that when you go to print your view, you'll get the gradient at the
full resolution of the printer and won't see any banding.
-jcr
John C. Randolph <<email_removed>> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Ian G. Gillespie | Jan 28, 03:52 | |
| Matt Gemmell | Jan 28, 04:26 | |
| Joseph Jones | Jan 28, 04:42 | |
| Christopher Hollan… | Jan 28, 10:33 | |
| Brock Brandenberg | Jan 28, 15:27 | |
| Ian G. Gillespie | Jan 28, 18:11 | |
| Joseph Jones | Jan 28, 19:47 | |
| Erik M. Buck | Jan 28, 20:04 | |
| Erik M. Buck | Jan 28, 20:51 | |
| Ian G. Gillespie | Jan 28, 21:14 | |
| John C. Randolph | Jan 28, 21:58 | |
| Ian G. Gillespie | Jan 28, 23:17 | |
| Matt Gemmell | Jan 29, 03:01 | |
| Christopher Hollan… | Jan 29, 04:19 |






Cocoa mail archive

