• 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: playing with arcs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: playing with arcs


  • Subject: Re: playing with arcs
  • From: email@hidden
  • Date: Thu, 15 Sep 2005 22:00:24 -0400

On Sep 15, 2005, at 5:43 PM, Giovanni Donelli wrote:

- (void)appendBezierPathWithArcFromPoint:(NSPoint)fromPoint toPoint: (NSPoint)toPoint radius:(float)radius

I have 2 points and I am trying to draw an arc in between. it simply doesn't work and I get an exception if I call solely the method above and then I try to stoke the resulting path.
Somehow if I use before that:


- (void)moveToPoint:(NSPoint)aPoint

the exception disappears but the arc is simply not drawn on the view.

any idea???

I assume you're trying to draw a curve. You need to use moveToPoint: to set the "starting point" for your path. Maybe you could use whatever value you have for fromPoint in the moveToPoint: method, and see if that helps. You also might want to investigate using a similar method to the above, appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise, which I what I use to draw curves. Make sure you've set the color of the stroke (eg. [[NSColor grayColor] set]) and the path's line width before you stroke it.


There's a great deal of examples out there involving NSBezierPath. You might want to try searching the cocoabuilder archives.

Cameron
_______________________________________________
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: 
 >playing with arcs (From: Giovanni Donelli <email@hidden>)

  • Prev by Date: Getting information out of a PDF with PDFKit
  • Next by Date: [SOLVED] RE: Getting a FSVolumeRefNum from NSString
  • Previous by thread: playing with arcs
  • Next by thread: `NSTask' and child processes
  • Index(es):
    • Date
    • Thread