PeachDrawing.Core

PeachDrawing.Core.TileBrush

TileBrush Constructors

Overloads  
TileBrush(Image, double, double) Creates a brush whose cells start at the origin of the user space, with no other transform.
TileBrush(Image, double, double, Matrix3x2, ImageSampling) Creates a brush repeating tile in cells cellWidth by cellHeight.

TileBrush(Image, double, double) Constructor

Creates a brush whose cells start at the origin of the user space, with no other transform.

public TileBrush(PeachDrawing.Core.Image tile, double cellWidth, double cellHeight);

Parameters

tile Image

the picture shown in every cell

cellWidth System.Double

the width of a cell

cellHeight System.Double

the height of a cell

TileBrush(Image, double, double, Matrix3x2, ImageSampling) Constructor

Creates a brush repeating tile in cells cellWidth by cellHeight.

public TileBrush(PeachDrawing.Core.Image tile, double cellWidth, double cellHeight, System.Numerics.Matrix3x2 transform, PeachDrawing.Core.ImageSampling sampling=PeachDrawing.Core.ImageSampling.Automatic);

Parameters

tile Image

the picture shown in every cell

cellWidth System.Double

the width of a cell, in brush space; the tile is stretched to fit

cellHeight System.Double

the height of a cell, in brush space; the tile is stretched to fit

transform System.Numerics.Matrix3x2

maps brush space onto the canvas’s user space at the moment of painting: it moves, scales, rotates or skews the whole grid. In brush space one cell has its top-left corner at the origin.

sampling ImageSampling

how the tile’s pixels are read when a cell is drawn at a size other than the tile’s own; only meaningful for a tile made of pixels

Exceptions

System.ArgumentNullException
tile is null

System.ArgumentOutOfRangeException
a cell dimension is not a positive, finite number