August 2003
Beginner
600 pages
12h 55m
English
A pen is an object that defines characteristics of a line. Pens are used to define color, line width, and line style (solid, dashed, and so on). Pens are used with almost all the drawing methods you'll learn about in this hour.
Visual C# .NET supplies a number of predefined pens, and you can also create your own. To create your own pen, use the following syntax:
Pen variable = new Pen(color, width);
After a pen is created, you can set its properties to adjust its appearance. For example, all Pen objects have a DashStyle property that determines the appearance of lines drawn with the pen. Table 18.2 lists the possible values for DashStyle.
| Value | Description |
|---|---|
| Dash | Specifies a line consisting ... |
Read now
Unlock full access