1.2. Section 2: Using Advanced Pens and Brushes

Most graphics programs can make do with relatively simple pens and brushes, but occasionally it's nice to bump it up a notch. This section describes more advanced pen and brush classes and techniques that can add an extra dimension of style and interest to an otherwise ordinary application.

1.2.1. Custom Dash Patterns

The Pen class supports three standard dash patterns: Solid, Dash, DashDot, DashDotDot, and Dot. Those are good enough for simple drawings, but if you need to distinguish among many lines, you can create your own dash patterns.

This technique is also useful when the standard dash patterns don't look good for a particular line thickness. Normally a unit of line length is the same as ...

Get Visual Basic Graphics 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.