• 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: One pixel width. One.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One pixel width. One.


  • Subject: Re: One pixel width. One.
  • From: Graham Cox <email@hidden>
  • Date: Sat, 26 Apr 2008 14:38:00 +1000

Setting a line width of 0 on NSBezierPath means "draw it 1 pixel wide at whatever resolution the destination device is". 1 pixel on the screen aligned to an integer coordinate will draw two pixels wide at half the brightness (anti-aliasing).

Thus, 1. offset your coordinates by 0.5 to avoid this effect.

2. RTFD. It's very well documented.


hth,

G.


On 26 Apr 2008, at 1:58 am, Lorenzo wrote:
Joe, thank you. That page helps. I succeeded, but I had to set the width to
0.01 because if I set it to zero I get a 2 pixels thick line when the scale
is different than 1.0. Don't know why. Please follow me.


[NSBezierPath setDefaultLineWidth:0.0];
_______________________________________________

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: 
 >Re: One pixel width. One. (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 682
  • Next by Date: Re: NSAlert
  • Previous by thread: Re: One pixel width. One.
  • Next by thread: Core Animation Flickering
  • Index(es):
    • Date
    • Thread