• 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
NSBezierPath stroke gives weird AA result.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBezierPath stroke gives weird AA result.


  • Subject: NSBezierPath stroke gives weird AA result.
  • From: Bertrand Landry-Hetu <email@hidden>
  • Date: Thu, 11 Aug 2005 15:16:53 -0700

Hi list,

I'm trying to draw a frame for some thumbnail I'm going to show in my
app. My graphic designer did some mockups in Illustrator that looks
great. It is basically a rectangle of which 2 corners are round (so
half a rounded rect :) ).

When I try to draw it using Quartz I get some weird anti aliasing
problems. I'm using [NSBezierPath appendBezierPathWithArcFromPoint:
...] to create the curved corners of the frame.

Everything looks fine when I fill the path, but it really looks ugly
when I stroke the path. It looks like the stroke is wider in the
curves. (see attached pic).

Anybody has any idea ?

Here is the code:

NSBezierPath * path = [NSBezierPath bezierPath];

[path moveToPoint: topRight];

[path appendBezierPathWithArcFromPoint: topLeft
                                                   toPoint: bottomLeft
                                                    radius: radius];

[path lineToPoint: bottomLeft];

[path appendBezierPathWithArcFromPoint: bottomRight
                                                   toPoint: topRight
                                                    radius: radius];

[path lineToPoint: topRight];

[path closePath];


Thanks.

Bertrand.
 _______________________________________________
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

  • Follow-Ups:
    • Re: NSBezierPath stroke gives weird AA result.
      • From: Bertrand Landry-Hetu <email@hidden>
  • Prev by Date: Re: Interface mockups
  • Next by Date: Re: NSBezierPath stroke gives weird AA result.
  • Previous by thread: Strange Key Input Behavior
  • Next by thread: Re: NSBezierPath stroke gives weird AA result.
  • Index(es):
    • Date
    • Thread