Drawing Basic Shapes

We continue our exploration of the namespace by drawing some basic shapes. Again, the variety and features contained in the namespace are astounding; we'll try to take a path that focuses on the shapes and illustration details you're most likely to employ in building your application.

Rectangles

The Rectangle structure is the backbone of the shapes presented in this section. Classes like Ellipse and Pie use it to bind their shape. The structure stores the size and location of a rectangular region.

We have two constructors available to create an instance of the Rectangle structure. One creates the rectangle based on the upper-left x and y coordinate, the width of the rectangle, and its height. To the other constructor, you ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.