For your first foray into custom drawing, you will start small by drawing a gray background for the DieView and a green line that bisects the view diagonally. (Figure 17.6).
Figure 17.6 Drawing with
Your drawing will be done in three steps:
Set the color. The color is an instance of NSColor. NSColor can specify colors in the RGB, HSV, CMYK, and grayscale color spaces.
Construct the path. The path specifies the line, curve, or shape that you want to draw. The path is an instance of NSBezierPath. (If you need to draw the same path multiple times, you can store an instance of ...