4.4. Transformation with Brushes

The TextureBrush, LinearGradientBrush, and PathGradientBrush classes also provide transformation methods. Brush transformation is not used very often, but it may be useful in some cases, as the following example will show.

A transformation on a TextureBrush object is a transformation of the image used as the texture. TextureBrush provides the methods MultiplyTransform, ResetTransform, RotateTransform, ScaleTransform, and TranslateTransform (see Table 4.15).

The TextureBrush class also provides a Transform property, which can be used to apply a transformation on a texture brush.

Table 4.15. TextureBrush methods
MethodDescription
MultiplyTransformMultiplies the Matrix object that represents the local geometric transformation ...

Get Graphics Programming with GDI+ 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.