17.9. Advanced Graphics Capabilities

The FCL offers many other graphics capabilities. The Brush hierarchy, for example, also includes HatchBrush, LinearGradientBrush, PathGradientBrush and TextureBrush.

Gradients, Line Styles and Fill Patterns

The program in Fig. 17.21 demonstrates several graphics features, such as dashed lines, thick lines and the ability to fill shapes with various patterns. These represent just a few of the additional capabilities of the System. Drawing namespace.

Figure 17.21. Shapes drawn on a form.
						1
						' Fig. 17.21: FrmDrawShapes.vb
						2
						' Drawing various shapes on a Form.
						3
						Imports System.Drawing.Drawing2D
 4
						5
						Public Class FrmDrawShapes
 6
						' draw various shapes on Form
						7
						Private Sub FrmDrawShapes_Paint(ByVal sender As Object, ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.