PeachDrawing.Core
PeachDrawing.Core
TileBrush Class
A paint that repeats a small picture, the <em>tile</em>, across the whole plane: the picture is laid out in a grid of cells and each cell shows it once. A shape filled or stroked with it shows whatever part of the grid lies under it, so adjacent shapes filled with the same brush continue the same pattern.
public sealed class TileBrush : PeachDrawing.Core.Brush
Inheritance System.Object → Brush → TileBrush
Remarks
Draw the tile onto the canvas returned by CreateTile(double, double) and pass the Image it returns. On a canvas that keeps drawings as vector content (a PDF), the tile stays vector content: one copy, however many cells show it.
| Constructors | |
|---|---|
| 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. |
| Properties | |
|---|---|
| CellHeight | The height of a cell, in brush space. |
| CellWidth | The width of a cell, in brush space. |
| Sampling | How the tile’s pixels are read when a cell is drawn at a size other than the tile’s own. The raster canvas honours Nearest/Pixelated (hard-edged) and treats everything else as bilinear without pre-filtering a strong reduction; a PDF passes it on as the image’s smoothing flag, which a viewer may ignore. |
| Tile | The picture shown in every cell. |
| Transform | Maps brush space onto the canvas’s user space. |