Class ReportShape
- Namespace
- DocWright.Reporting.Pagination
- Assembly
- DocWright.Reporting.dll
One drawing operation inside a report item that draws itself.
public abstract class ReportShape
- Inheritance
-
ReportShape
- Derived
- Inherited Members
Remarks
Coordinates are relative to the owning item's top-left corner, not to the page. Such an item is a self-contained drawing: a viewer that scrolls one, an SVG projection that gives one its own coordinate system, and an item that appears on more than one page all want the same shapes rather than a set translated per appearance. Left and Top are the offset to add.
The vocabulary is deliberately small — a rectangle, a path, a region and a label — because every plot type, every barcode and every gauge reduces to those, and because this is public contract that a viewer binds to. It is shared rather than repeated per item type: a barcode drawn in a different vocabulary from a chart would be a second thing for every consumer to learn.
Three things were added since the vocabulary was first fixed. The region (Phase 54e2), for the one thing the others cannot say: several contours that share edges and must be filled as one area. Drawn as separate rectangles, two dark QR Code modules one above the other meet on an edge that an antialiasing renderer covers twice at partial coverage, leaving a grey seam across solid dark; measured, the seams broke the finder patterns ZXing looks for. A path's gradient fill (ReportShapeGradient, Phase 94), for a gauge part's gradient, which flat shapes cannot say without banding. And a label's Angle (Phase 94), for scale labels that follow a gauge's scale round: text that stays text for a viewer to search, where outlines would not.
Properties
- Fill
Gets the fill colour, or null when the shape is not filled.
- FillAlpha
Gets the fill's opacity, from 0 (transparent) to 255 (opaque); meaningless when Fill is null.
- Gradient
Gets the gradient the shape is filled with, or null when its fill is the flat Fill. When set, Fill is the flat colour a consumer that cannot paint a gradient falls back to, and FillAlpha is the whole gradient's opacity.
- Hatch
Gets the hatch the shape is filled with, or null (Phase 96). A hatch is the whole fill — it wins over a Gradient, as it does in the reference's engines — and Fill is then the flat colour a consumer that cannot paint one falls back to, its ground.
- Kind
Gets what kind of shape this is.
- Stroke
Gets the stroke colour, or null when the shape is not stroked.
- StrokeAlpha
Gets the stroke's opacity, from 0 (transparent) to 255 (opaque); meaningless when Stroke is null.
- StrokeWidth
Gets the stroke width; meaningless when Stroke is null.