December 2001
Beginner
976 pages
22h 4m
English
![]() | Pens, Lines, and Rectangles |
GDI+ allows you to draw more than just text. You can draw lines, rectangles, circles, ellipses, and so on. You can even control the color in which you want to draw these graphical elements.
The System.Drawing.Pen class is provided in the .NET Framework to encapsulate colors used during the drawing process. You can create Pen objects based on colors you specify and then use these Pen objects when drawing text, lines, rectangles, or whatever.
The graphical elements such as lines and rectangles are drawn using methods on the Graphics object. The following method is one of several DrawLine methods that can be used to draw ...
Read now
Unlock full access