• 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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing?


  • Subject: Re: Drawing?
  • From: "Steven Degutis" <email@hidden>
  • Date: Sun, 12 Oct 2008 12:28:35 -0500

Ah yes, that's right. Well I wrote a workaround for this very specific
situation for my own iPhone app:
void SDPathAddRoundedRect(CGMutablePathRef path, CGRect rect, CGFloat radius
) {
        CGFloat left = rect.origin.x, top = rect.origin.y, width =
rect.size.width, height = rect.size.height;

        CGPathMoveToPoint(path, NULL, left, top + radius);
        CGPathAddArcToPoint(path, NULL, left, top, left + radius, top,
radius);
        CGPathAddLineToPoint(path, NULL, left + width - radius, top);
        CGPathAddArcToPoint(path, NULL, left + width, top, left + width, top
+ radius, radius);
        CGPathAddLineToPoint(path, NULL, left + width, top + height - radius
);
        CGPathAddArcToPoint(path, NULL, left + width, top + height, left +
width - radius, top + height, radius);
        CGPathAddLineToPoint(path, NULL, left + radius, top + height);
        CGPathAddArcToPoint(path, NULL, left, top + height, left, top +
height - radius, radius);

        CGPathCloseSubpath(path);
}

On Sun, Oct 12, 2008 at 12:14 PM, Dave DeLong <email@hidden> wrote:

> Unfortunately, NSBezierPath does not exist on the iPhone.
>
> Dave
>
> On 12 Oct, 2008, at 10:50 AM, Steven Degutis wrote:
>
>  Finally, if you want to get fancy drawing boxes with rounded corners, have
>> a look at
>> NSBezierPath.
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>



--
Steven Degutis
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Drawing? (From: "J. Todd Slack" <email@hidden>)
 >Re: Drawing? (From: "Steven Degutis" <email@hidden>)
 >Re: Drawing? (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: Drawing?
  • Next by Date: Re: Add animation layer and then remove animation layer
  • Previous by thread: Re: Drawing?
  • Next by thread: [Moderator] Re: Drawing?
  • Index(es):
    • Date
    • Thread