Constructor ReportShapeLabel
- Namespace
- DocWright.Reporting.Pagination
- Assembly
- DocWright.Reporting.dll
ReportShapeLabel(string, Twips, Twips, Twips, ReportShapeLabelAlignment, string, Twips, bool, bool, ColorRgb)
Initializes a run of text placed by an anchor and a baseline.
public ReportShapeLabel(string text, Twips left, Twips baseline, Twips width, ReportShapeLabelAlignment alignment, string fontFamily, Twips fontSize, bool bold, bool italic, ColorRgb color)
Parameters
textstringThe text.
leftTwipsThe anchor's horizontal position, which
alignmentinterprets.baselineTwipsThe baseline, relative to the owning item's top edge.
widthTwipsThe text's measured width.
alignmentReportShapeLabelAlignmentHow the text sits against its anchor.
fontFamilystringThe font family.
fontSizeTwipsThe font size.
boldboolWhether the text is bold.
italicboolWhether the text is italic.
colorColorRgbThe text's colour.
Exceptions
- ArgumentNullException
textorfontFamilyis null.
ReportShapeLabel(string, Twips, Twips, Twips, ReportShapeLabelAlignment, string, Twips, bool, bool, ColorRgb, IReadOnlyList<Twips>?)
Initializes a run of text whose characters each advance by their own measured width.
public ReportShapeLabel(string text, Twips left, Twips baseline, Twips width, ReportShapeLabelAlignment alignment, string fontFamily, Twips fontSize, bool bold, bool italic, ColorRgb color, IReadOnlyList<Twips>? advances)
Parameters
textstringThe text.
leftTwipsThe anchor's horizontal position, which
alignmentinterprets.baselineTwipsThe baseline, relative to the owning item's top edge.
widthTwipsThe text's measured width.
alignmentReportShapeLabelAlignmentHow the text sits against its anchor.
fontFamilystringThe font family.
fontSizeTwipsThe font size.
boldboolWhether the text is bold.
italicboolWhether the text is italic.
colorColorRgbThe text's colour.
advancesIReadOnlyList<Twips>One advance per code point of
text, in order; null or empty to sharewidthevenly between them. Copied.
Exceptions
- ArgumentNullException
textorfontFamilyis null.- ArgumentException
advancesdoes not hold one advance per code point.
ReportShapeLabel(string, Twips, Twips, Twips, ReportShapeLabelAlignment, string, Twips, bool, bool, ColorRgb, IReadOnlyList<Twips>?, GlyphOrientation)
Initializes a run of text turned a quarter turn, such as a chart's value-axis title.
public ReportShapeLabel(string text, Twips left, Twips baseline, Twips width, ReportShapeLabelAlignment alignment, string fontFamily, Twips fontSize, bool bold, bool italic, ColorRgb color, IReadOnlyList<Twips>? advances, GlyphOrientation orientation)
Parameters
textstringThe text.
leftTwipsFor upright text, the anchor's horizontal position, which
alignmentinterprets; for turned text, the horizontal position of the run's origin — the start of its baseline, where its first glyph begins.baselineTwipsFor upright text, the baseline, relative to the owning item's top edge; for turned text, the vertical position of the run's origin.
widthTwipsThe text's measured advance, along its baseline.
alignmentReportShapeLabelAlignmentHow upright text sits against its anchor; turned text is placed by its origin and ignores it.
fontFamilystringThe font family.
fontSizeTwipsThe font size.
boldboolWhether the text is bold.
italicboolWhether the text is italic.
colorColorRgbThe text's colour.
advancesIReadOnlyList<Twips>One advance per code point of
text, in order; null or empty to sharewidthevenly between them. Copied.orientationGlyphOrientationWhich way the text is turned: CounterClockwise90 reads bottom to top, as a value axis's title does; Clockwise90 top to bottom.
Exceptions
- ArgumentNullException
textorfontFamilyis null.- ArgumentException
advancesdoes not hold one advance per code point.
ReportShapeLabel(string, Twips, Twips, Twips, string, Twips, bool, bool, ColorRgb, IReadOnlyList<Twips>?, double)
Initializes a run of text turned to any angle about its origin, such as a gauge's scale label that follows the scale round (Phase 94).
public ReportShapeLabel(string text, Twips left, Twips baseline, Twips width, string fontFamily, Twips fontSize, bool bold, bool italic, ColorRgb color, IReadOnlyList<Twips>? advances, double angle)
Parameters
textstringThe text.
leftTwipsThe horizontal position of the run's origin — the start of its baseline, where its first glyph begins.
baselineTwipsThe vertical position of the run's origin, relative to the owning item's top edge.
widthTwipsThe text's measured advance, along its baseline.
fontFamilystringThe font family.
fontSizeTwipsThe font size.
boldboolWhether the text is bold.
italicboolWhether the text is italic.
colorColorRgbThe text's colour.
advancesIReadOnlyList<Twips>One advance per code point of
text, in order; null or empty to sharewidthevenly between them. Copied.angledoubleHow far the baseline is turned, in degrees clockwise from level about the origin; brought into (−180, 180], and 0 when it is not a finite number.
Exceptions
- ArgumentNullException
textorfontFamilyis null.- ArgumentException
advancesdoes not hold one advance per code point.