• 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: Bezier Paths.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bezier Paths.


  • Subject: Re: Bezier Paths.
  • From: Shawn Erickson <email@hidden>
  • Date: Wed, 28 Dec 2005 16:32:50 -0800


On Dec 28, 2005, at 4:08 PM, Brian O'Brien wrote:

Hi, I need to write a method that constructs a bezier path and returns it.

Lets say for example that I have 4 points.
I want to draw three rectangles in red and one rectangle in blue.
The four points represent the centers of each of the rectangles.

So how do I construct this path and return it so that it can be passed
on to another class and rendered with the proper colors?

NSBezierPath instances don't have the concept of color. Color is a concept of the drawing context. When you stroke or fill a path color (among other items) comes into play.

Consider using an object that can contain the rectangles needed and that can draw those on demand in a focused context. Note the capabilities provided by NSRectFillListWithColors (assuming by drawing you mean filling).

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Bezier Paths. (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: Bezier Paths.
  • Next by Date: Re: Tracking an NSArrayController's selection
  • Previous by thread: Re: Bezier Paths.
  • Next by thread: Help Files
  • Index(es):
    • Date
    • Thread