Class ReportShapeHatch
- Namespace
- DocWright.Reporting.Pagination
- Assembly
- DocWright.Reporting.dll
A hatch a ReportShapePath or a ReportShapeRegion is filled with (Phase 96): an 8 × 8 tile of cells, each a blend of the Line colour over the Ground by its coverage, repeated across the shape from the owning item's top-left corner on a grid of CellsPerInch cells to the inch.
public sealed class ReportShapeHatch
- Inheritance
-
ReportShapeHatch
- Inherited Members
Remarks
The reference's chart, gauge and map engines draw an item into a 300-dpi bitmap of its own and fill a hatched part with a GDI+ hatch brush, which tiles from that bitmap's corner a cell to a pixel (oracle facts from 213). So the grid is the item's, not the page's: two hatched parts of one item line up, and a part's tile does not start at its own edge. Under the engines' antialiasing three of GDI+'s 53 styles — the plain diagonals and their cross — are three cells wide with partial coverage at their sides, which is why a cell has a coverage and not a bit.
Cell (column, row) of a pixel at (x, y) cells from the item's corner is (x mod 8, y mod 8), and Coverage lists the 64 cells row by row from the top-left. A cell's colour is the line's over the ground's at its coverage: an opaque line on a translucent ground — a semi-transparent palette's — stays opaque.
Constructors
- ReportShapeHatch(IReadOnlyList<byte>, ColorRgb, byte, ColorRgb, byte)
Initializes a hatch.
Fields
- CellsPerInch
The grid a hatch is drawn on: the reference's item rasters are 300 dpi, a cell to a pixel.
Properties
- Coverage
Gets the 64 cells' line coverage, 0 to 255, row by row from the top-left.
- Ground
Gets the ground colour.
- GroundAlpha
Gets the ground's opacity, 0 (transparent) to 255 (opaque).
- Line
Gets the line colour.
- LineAlpha
Gets the line colour's opacity, 0 (transparent) to 255 (opaque).
Methods
- Cell(int, out ColorRgb, out byte)
The colour and opacity of one cell: the line over the ground at the cell's coverage, composited the way a brush paints a partly covered pixel — premultiplied, so a clear ground lends no colour.