17.8. Drawing Polygons and Polylines

Polygons are multisided shapes. There are several Graphics methods used to draw polygons—DrawLines draws a series of connected lines, DrawPolygon draws a closed polygon and FillPolygon draws a solid polygon. These methods are described in Fig. 17.19. The program in Fig. 17.20 allows users to draw polygons and connected lines via the methods listed in Fig. 17.19.

Figure 17.19. Graphics methods for drawing polygons.
MethodDescription
DrawLinesDraws a series of connected lines. The coordinates of each point are specified in an array of Point objects. If the last point is different from the first point, the figure is not closed.
DrawPolygonDraws a polygon. The coordinates of each point are specified in an array of ...

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.