Collections of Shapes
It is often useful to collect various “building block” shapes into a single unit. Rather than managing each rectangle in a bar graph, for instance, it is often easier to group these objects into a single, manageable unit. If the objects need to be moved or redrawn, you can simply make one method call. Similarly, if you are transforming the objects, maybe rotating them all 45°, it is much easier to transform a group than transform each item independently. The System.Drawing.Drawing2D namespace provides us the Path class for grouping shapes.
Additionally, once you've defined your various object groups, it is often necessary to indicate how those groups interact with one another. If you've ever used a drawing application, 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.