O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.1. Drawing Surfaces

Every drawing application (regardless of the operating system), consists of three common components: a canvas, a brush or pen, and a process.

  1. The canvas is the space on which objects will be drawn. For example, in a Windows application, a Windows Form is a canvas.

  2. A brush or a pen represents the texture, color, and width of the objects to be drawn on the canvas.

  3. The process describes how objects are drawn on the canvas.

To draw graphics objects you need to have a pen or a brush, which defines the texture, color, and width of the drawing. For example, if you draw a line or a rectangle, you need to create a pen with a color and width.

The process component of the drawing application includes making a call to draw the line or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required