Constructor PatternFill
PatternFill(ulong, ColorRgb, ColorRgb?)
Initializes a pattern fill.
public PatternFill(ulong tile, ColorRgb foreground, ColorRgb? background)
Parameters
tileulongThe 8x8 tile bits.
foregroundColorRgbThe colour painted where a tile bit is set.
backgroundColorRgb?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
coverageIReadOnlyList<byte>The 64 cells' coverage by the foreground, 0 to 255, row by row from the top-left; copied.
foregroundColorRgbThe foreground colour: a hatch's lines.
foregroundAlphabyteThe foreground's opacity, 0 (clear) to 255 (opaque).
backgroundColorRgbThe background colour: a hatch's ground.
backgroundAlphabyteThe background's opacity.
cellsPerInchintThe grid: how many cells make an inch, 1 to MaxCellsPerInch.
originXTwipsThe left edge of a tile's first cell on the page, in twips.
originYTwipsThe top edge of a tile's first cell on the page, in twips.
Exceptions
- ArgumentNullException
coverageis null.- ArgumentException
coveragedoes not hold TileCellCount cells.- ArgumentOutOfRangeException
cellsPerInchis 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
coverageIReadOnlyList<byte>The 64 cells' coverage of the foreground, row by row from the top-left, 0 to 255.
foregroundColorRgbThe foreground colour.
foregroundAlphabyteThe foreground's opacity, 0 to 255.
backgroundColorRgbThe background colour.
backgroundAlphabyteThe background's opacity, 0 to 255.
cellsPerInchintThe grid, in cells to the inch.
originXTwipsThe left edge of the tile's first cell on the page.
originYTwipsThe top edge of the tile's first cell on the page.
resampledAsImageboolTrue 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
coverageis null.- ArgumentException
coveragedoes not hold TileCellCount cells.- ArgumentOutOfRangeException
cellsPerInchis out of range.