Name

TextureBrush

Synopsis

This class provides a means of filling a surface with an image. You can specify how the image is to be tiled with the WrapMode, and you can also apply a Transform matrix to the brush so that the image appears appropriately in your particular coordinate space.


public sealed class TextureBrush : Brush {

// Public Constructors

   public TextureBrush(Image bitmap);

   public TextureBrush(Image image, Rectangle dstRect);

   public TextureBrush(Image image, RectangleF dstRect);

   public TextureBrush(Image image, RectangleF dstRect, System.Drawing.Imaging.ImageAttributes imageAttr);

   public TextureBrush(Image image, Rectangle dstRect, System.Drawing.Imaging.ImageAttributes imageAttr);

   public TextureBrush(Image image, System.Drawing.Drawing2D.WrapMode wrapMode);

   public TextureBrush(Image image, System.Drawing.Drawing2D.WrapMode wrapMode, Rectangle dstRect);

   public TextureBrush(Image image, System.Drawing.Drawing2D.WrapMode wrapMode, RectangleF dstRect);

// Public Instance Properties

   public Image Image{get; }

   public Matrix Transform{set; get; }

   public WrapMode WrapMode{set; get; }

// Public Instance Methods

   public override object Clone();  // overrides Brush

   public void MultiplyTransform(System.Drawing.Drawing2D.Matrix matrix);

   public void MultiplyTransform(System.Drawing.Drawing2D.Matrix matrix, 

        System.Drawing.Drawing2D.MatrixOrder order);

   public void ResetTransform();

   public void RotateTransform(float angle);

   public void RotateTransform(float angle, System.Drawing.Drawing2D.MatrixOrder ...

Get .NET Windows Forms in a Nutshell 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.