Table of Contents

Constructor PatternFill

Namespace
DocWright.Core.Rendering
Assembly
DocWright.Core.dll

PatternFill(ulong, ColorRgb, ColorRgb?)

Initializes a pattern fill.

public PatternFill(ulong tile, ColorRgb foreground, ColorRgb? background)

Parameters

tile ulong

The 8x8 tile bits.

foreground ColorRgb

The colour painted where a tile bit is set.

background ColorRgb?

The colour painted where a tile bit is clear, or null to leave those pixels alone.

PatternFill(IReadOnlyList<byte>, ColorRgb, byte, ColorRgb, byte, int, Twips, Twips)

Initializes a pattern of coverage on a grid of its own: each cell the foreground over the background at its coverage.

public PatternFill(IReadOnlyList<byte> coverage, ColorRgb foreground, byte foregroundAlpha, ColorRgb background, byte backgroundAlpha, int cellsPerInch, Twips originX, Twips originY)

Parameters

coverage IReadOnlyList<byte>

The 64 cells' coverage by the foreground, 0 to 255, row by row from the top-left; copied.

foreground ColorRgb

The foreground colour: a hatch's lines.

foregroundAlpha byte

The foreground's opacity, 0 (clear) to 255 (opaque).

background ColorRgb

The background colour: a hatch's ground.

backgroundAlpha byte

The background's opacity.

cellsPerInch int

The grid: how many cells make an inch, 1 to MaxCellsPerInch.

originX Twips

The left edge of a tile's first cell on the page, in twips.

originY Twips

The top edge of a tile's first cell on the page, in twips.

Exceptions

ArgumentNullException

coverage is null.

ArgumentException

coverage does not hold TileCellCount cells.

ArgumentOutOfRangeException

cellsPerInch is out of range.

PatternFill(IReadOnlyList<byte>, ColorRgb, byte, ColorRgb, byte, int, Twips, Twips, bool)

Initializes a pattern of coverage on a grid of its own, stating how a rasterizer is to draw its tile.

public PatternFill(IReadOnlyList<byte> coverage, ColorRgb foreground, byte foregroundAlpha, ColorRgb background, byte backgroundAlpha, int cellsPerInch, Twips originX, Twips originY, bool resampledAsImage)

Parameters

coverage IReadOnlyList<byte>

The 64 cells' coverage of the foreground, row by row from the top-left, 0 to 255.

foreground ColorRgb

The foreground colour.

foregroundAlpha byte

The foreground's opacity, 0 to 255.

background ColorRgb

The background colour.

backgroundAlpha byte

The background's opacity, 0 to 255.

cellsPerInch int

The grid, in cells to the inch.

originX Twips

The left edge of the tile's first cell on the page.

originY Twips

The top edge of the tile's first cell on the page.

resampledAsImage bool

True when the tile is an image the rasterizer resamples and repeats on whole pixels, as Word's export draws a preset pattern; false when each cell is covered exactly, as a report's hatch is.

Exceptions

ArgumentNullException

coverage is null.

ArgumentException

coverage does not hold TileCellCount cells.

ArgumentOutOfRangeException

cellsPerInch is out of range.