• 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: NSBezierPath Fill and Stroke woes;
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath Fill and Stroke woes;


  • Subject: Re: NSBezierPath Fill and Stroke woes;
  • From: "Matt Budd (Madentec)" <email@hidden>
  • Date: Thu, 21 Jul 2005 09:00:37 -0600

That was the exact issue! I didn't realize that NSGraphicsContext had a -setShouldAntiAlias: method...I assumed (that should have been my first clue) that image interpolation (something which I had done before to do antialiasing effects on scaled images) was just Apple's fancy name for antialising.

I've changed it to use -setShouldAntiAlias: and it does what I need. Kinda weird that this value is not stored as part of the graphics state, but I just manually have to restore it myself.

Thanks for the help!

 - Matt

On Jul 21, 2005, at 8:40 AM, Scott Thompson wrote:

If you run this code in a view's -drawRect: method, you'll see some weird things with the first set (loBadFill): even though I am filling the _same_ rect twice in a row with a different color, the second fill doesn't completely cover the rect (i.e. I get a bit of bleed of the first fill color on the edges). However, when I use the non-translated one from the second set (loGoodFill), I get what I would expect (no bleed of the magenta, and only cyan showing). And I have to use the translated set, as you can see with the loBadStroke one (the stroke is not crisp).

Is this a known issue, or is something else weird?


I don't think it's an "issue" at all. You are seeing the color from the second rectangle composited on top of the color of the first rectangle where the antialiasing of the pixel edges occur.



I have tried it on both Tiger and Panther and get the same result. I have also tried turning of the anti-aliasing using "[[NSGraphicsContext currentContext] setImageInterpolation: NSImageInterpolationNone];". Any thoughts?


That won't turn off antialiasing. That will turn off image interpolation. The two are not the same.


try "setShouldAntialias:"

Scott



_______________________________________________ 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 Fill and Stroke woes;
      • From: Scott Thompson <email@hidden>
References: 
 >NSBezierPath Fill and Stroke woes; (From: "Matt Budd (Madentec)" <email@hidden>)
 >Re: NSBezierPath Fill and Stroke woes; (From: Scott Thompson <email@hidden>)

  • Prev by Date: Re: NSBezierPath Fill and Stroke woes;
  • Next by Date: Catching system signals and exception handling
  • Previous by thread: Re: NSBezierPath Fill and Stroke woes;
  • Next by thread: Re: NSBezierPath Fill and Stroke woes;
  • Index(es):
    • Date
    • Thread