Drawing a grid in Core Graphics

Discussion in 'Mac Programming' started by Blakeasd, Nov 20, 2010.

  1. macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
  2. macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #2
    Show what code you've tried and are not happy with.
     
  3. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    Very much this! One thing I would note: if you want crisp lines then draw at 0.5 increments. The reasons for this are due to the way Quartz anti-aliases. So a line from (0,0.5) to (10,0.5) would look like a crisp single-pixel line and (0,0) to (10,0) would look like it was straddling the pixel boundary and be anti-aliases across two pixels.
     

Share This Page