• 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: Line Drawing problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line Drawing problem


  • Subject: Re: Line Drawing problem
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 03 Jul 2011 14:51:09 -0700

On Jul 3, 2011, at 1:48 PM, Dale Satterfield wrote:

> Lines with sufficient slope always draw in Black(the set color), and the specified width. However if the slope is low enough they print thinner, and in a different color.
> This is an example:

The image didn’t show up, but you’re probably seeing the effects of subpixel antialiasing, which uses the relative positions of the R, G and B subcomponents of an LCD pixel to increase apparent horizontal resolution.

Another issue that’s probably exacerbating the distortion is that, if you’re drawing 1-pixel wide lines [or any odd integer width] you should offset their x and y coords by 0.5 to ensure that, if horizontal/vertical or nearly so, the lines end up entirely within a pixel instead of split between two pixels, which will smear them. (The reason for this is that the pixels are in between integer grid coordinates, so the pixel centers are at 0.5, 1.5, 2.5, etc.)

—Jens_______________________________________________

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

  • Follow-Ups:
    • Re: Line Drawing problem
      • From: Dale Satterfield <email@hidden>
References: 
 >Line Drawing problem (From: Dale Satterfield <email@hidden>)

  • Prev by Date: Line Drawing problem
  • Next by Date: Re: Line Drawing problem
  • Previous by thread: Line Drawing problem
  • Next by thread: Re: Line Drawing problem
  • Index(es):
    • Date
    • Thread