• 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: Scott Thompson <email@hidden>
  • Date: Thu, 21 Jul 2005 10:09:43 -0500


On Jul 21, 2005, at 10:00 AM, Matt Budd (Madentec) wrote:

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

That is odd that it is not part of the graphics state. Evidently it's calling CGContextSetAllowsAntialiasing instead of CGContextSetShouldAntialias in spite of it's name.


You might be able to do something like this:

[NSGraphicsContext saveGraphicsState];

CGContextRef myContext = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
CGContextSetShouldAntialias(myContext, false);


... draw ...

[NSGraphicsContext restoreGraphicsState];

which should save and restore the antialiasing as part of the graphics state.


If that works, then you could do something clever like add a method to NSGraphicsContext through a category to trip the CGContextSetShouldAntialias bit.


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


References: 
 >NSBezierPath Fill and Stroke woes; (From: "Matt Budd (Madentec)" <email@hidden>)
 >Re: NSBezierPath Fill and Stroke woes; (From: Scott Thompson <email@hidden>)
 >Re: NSBezierPath Fill and Stroke woes; (From: "Matt Budd (Madentec)" <email@hidden>)

  • Prev by Date: Catching system signals and exception handling
  • Next by Date: Re: Odd Doc Type Issue
  • Previous by thread: Re: NSBezierPath Fill and Stroke woes;
  • Next by thread: NSPopupButton contentObjects binding
  • Index(es):
    • Date
    • Thread