• 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: Round Corners With BezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Round Corners With BezierPath


  • Subject: Re: Round Corners With BezierPath
  • From: Chad Seldomridge <email@hidden>
  • Date: Tue, 22 Aug 2006 22:27:44 -0600


On Aug 22, 2006, at 10:03 PM, email@hidden wrote:

Message: 11 Date: Tue, 22 Aug 2006 21:33:24 -0400 From: Tom Marchand <email@hidden> Subject: Round Corners With BezierPath To: email@hidden Message-ID: <email@hidden> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi,

I am trying to draw a rectangle with round corners using NSBezierPath
and I am not having much luck.  Here's the code:

NSRect				myBounds	=	[self bounds];
NSBezierPath		*Box;

[NSBezierPath setDefaultLineJoinStyle:NSRoundLineJoinStyle];
Box=[NSBezierPath bezierPathWithRect: myBounds];
[Box stroke];

The corners are always square no matter what I set the JoinStyle to
although [Box lineJoinStyle] returns the style I set in my code.  Any
idea what I am doing wrong?


I have some code here http://web.mac.com/cseldomridge/iWeb/Software/ Downloads.html
which draws a rectangle with rounded corners. It's at the bottom of the page in the
Waveform Control Demo source code (WaveformCell.m). I may be doing this the hard way,
but I am drawing the rounded rect by appending lines and arcs to a NSBezierPath.
The setDefaultLineJoinStyle method is for setting the corner shape when two lines meet.
The size of this join style rounded edge will be no larger than your line width.


chad seldomridge
_______________________________________________
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


  • Prev by Date: Re: Round Corners With BezierPath
  • Next by Date: Loading an URL in Safari
  • Previous by thread: Re: Round Corners With BezierPath
  • Next by thread: Re: Round Corners With BezierPath
  • Index(es):
    • Date
    • Thread