11.5. System.Drawing.Drawing2D namespace

The System.Drawing.Drawing2D namespace contains classes and enumerations that provide advanced two-dimensional and vector graphics functionality. Using this namespace we can utilize gradient brushes, perform geometric transformations with the Matrix class, and create paths by using the GraphicsPath class.

Gradient brushes

The System.Drawing.Drawing2D namespace defines two classes that represent gradient brushes – the LinearGradientBrush and PathGradientBrush classes. Both are based on the abstract Brush class and extend it with gradient-filling functionality. The LinearGradientBrush class provides two-color gradients, as well as customized multicolor gradients. To specify the blend pattern, we should ...

Get A Programmer's Guide to .NET 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.