GraphicsPaths and Regions

GraphicsPaths and Regions are two distinct but similar classes.

GraphicsPaths represent a list of independent figures. A GraphicsPath can, for example, contain different shapes and line drawings. When drawing the GraphicsPath, all figures are drawn at once.

A Region is an enclosed area representing a shape in which you can perform various drawing operations. Regions can, like the GraphicsPath, have disconnected elements.

Drawing with the GraphicsPath Class

Earlier, it was said that the GraphicsPath class is used to combine graphical shapes including lines. The following example illustrates how a GraphicsPath can be composed of lines and shapes that might not even be connected. What’s convenient about the graphics path ...

Get Delphi for .NET Developer’s Guide 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.