Drawing Points and Rectangles
Cocoa does not provide any methods, objects, or functions specifically intended for drawing points. Cocoa provides the NSPoint structure, yet there is no means of rendering an NSPoint onscreen. The reason has to do with the graphics model employed by Cocoa and Quartz. Apple describes the graphics model as being the same model as PDF and PostScript. This implies that all drawing should be considered to be both device and resolution independent. As a result, drawing a point is meaningless. In this graphics model, the term point is used to refer to a very precise, infinitely small point in the mathematical sense. If such a point was marked with ink, it still wouldn’t be seen because it is infinitely small.
When drawing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access