Drawing Thin Lines - moralesalberto-cocoa/drawing GitHub Wiki

In cocoa, to draw a line that is thin, you need to offset the y component of the point by 0,5. I end up doing this for example:

    self.startPoint = CGPointMake(lroundf(startP.x), lroundf(startP.y)+0.5);
    self.endPoint = CGPointMake(lroundf(endP.x), lroundf(endP.y)+0.5);;