• 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 bugs? (Contains point and fill)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath bugs? (Contains point and fill)


  • Subject: Re: NSBezierPath bugs? (Contains point and fill)
  • From: Lester Dowling <email@hidden>
  • Date: Thu, 13 Oct 2005 15:51:13 +1000


Second, I have my image set to have NO alpha blending at all, so
drawing lines results in SOLID colors without and smoothing.  Yet
again, when I use a non-rectangular NSBezierPath and fill its
contents to the background color, I will get some amount of grey
pixels around the edges.  Sometimes it is more severe, others it is
less, but I'm hoping for some amount of pixel accuracy here.  Again,
is this a known issue with workarounds?  Are there any suggestions on
how to handle it?


I'm guessing you wish to draw into your image without aliasing the edges,
aka anti-aliasing. You can turn aliasing on and off for the current graphics
context, NSGraphicsContext. Eg,


NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
[currentContext setShouldAntialias: NO ];
// ... draw jaggies


	[ currentContext setShouldAntialias: YES ];
	// ... draw smoothies

Along similar lines, you can adjust image smoothing with another method in NSGraphicsContext. Eg,

	[ currentContext setImageInterpolation: NSImageInterpolationNone ];
	// ... jagged image ops

	[ currentContext setImageInterpolation: NSImageInterpolationHigh ];
	// ... smooth as black lace

--
Lester
_______________________________________________
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: where's showAllApplications ?
  • Next by Date: Re: where's showAllApplications ?
  • Previous by thread: Brightness -> Alpha mod? (was "Re: NSBezierPath bugs? (Contains point and fill)")
  • Next by thread: Bindings do not work in threads?
  • Index(es):
    • Date
    • Thread