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 ...
Get Cocoa® Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.