Class ReportShapeGradient
- Namespace
- DocWright.Reporting.Pagination
- Assembly
- DocWright.Reporting.dll
A linear gradient a ReportShapePath is filled with: colours that change along the line from Start to End and stay constant across it.
public sealed class ReportShapeGradient
- Inheritance
-
ReportShapeGradient
- Inherited Members
Remarks
A point takes the colour of its projection onto that line: before Start the first stop's,
past End the last stop's, and between two stops a straight blend of their red, green and blue in
sRGB, with no gamma — the way the reference engine's gradient brushes blend (Phase 94: red to blue is
#7F0081 half way). The shape's FillAlpha applies to the whole gradient.
A Radial gradient runs out from Start, its centre, over the ellipse whose radii are End less Start in each direction: a point's position is its distance from the centre as a share of the ellipse's in the same direction.
The gradient is the second addition to the vocabulary since it was fixed (Phase 94), for a gauge part's gradient, which a viewer has to paint as one and which no number of flat shapes says without banding or seams. It has two kinds and no more: every gradient a gauge draws reduces to them — a centre-out one over a box to four linear ones over its triangles, over a circle to one radial one, a sweep round a dial to one linear one per slice — so a consumer learns two paints, not nine.
Constructors
- ReportShapeGradient(ReportShapeGradientKind, ReportShapePoint, ReportShapePoint, IReadOnlyList<ReportShapeGradientStop>)
Initializes a linear or radial gradient.
- ReportShapeGradient(ReportShapePoint, ReportShapePoint, IReadOnlyList<ReportShapeGradientStop>)
Initializes a linear gradient.
Properties
- End
Gets where the last stop's position lies — for a radial gradient, the centre plus its two radii — relative to the owning item's top-left corner.
- Kind
Gets how the stops run: along a line, or out from a centre.
- Start
Gets where the first stop's position lies — a radial gradient's centre — relative to the owning item's top-left corner.
- Stops
Gets the stops, in ascending order of position.