8.4. Image Attributes and the ImageAttributes Class

Images represented by the Image class and its inherited classes can also store attributes. The ImageAttributes class represents the attributes of an image. DrawImage can take a parameter of type ImageAttributes, which represents how the colors are applied to an image when it is rendered. The ImageAttributes class has no properties, but it provides many useful methods. Let’s take a look at the methods provided by the ImageAttributes class.

8.4.1. The SetWrapMode Method

Sometimes we need to fill a graphics shape with a texture that’s smaller or larger than the graphics shape. The wrap mode—represented by the WrapMode enumeration—specifies how a texture is tiled when it is larger or smaller than ...

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.