PeachDrawing.PDF.PdfCanvas
PdfCanvas.DrawString Method
| Overloads | |
|---|---|
| DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>) | Draw the given string using the given font and foreground color at given location. |
| DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>, string) | See DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>, string)’s own remarks for logicalText - threaded straight through to the engine’s own string-drawing routine, the one real PDF-writing path that acts on it. |
PdfCanvas.DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>) Method
Draw the given string using the given font and foreground color at given location.
public override void DrawString(string str, PeachDrawing.Core.Font font, PeachDrawing.Core.PaintColor color, PeachDrawing.Core.PaintPoint point, PeachDrawing.Core.Size size, double letterSpacing=0.0, PeachDrawing.Core.FontPalette? fontPalette=null, System.Nullable<PeachDrawing.Text.Shaping.ShapeSettings> features=null);
Parameters
str System.String
the string to draw
font Font
the font to use to draw the string
color PaintColor
the text color to set
point PaintPoint
the location to start string draw (top-left)
size Size
used to know the size of the rendered text for transparent text support
letterSpacing System.Double
extra space to add between each pair of adjacent characters (CSS letter-spacing),
in the same units as point. 0 (the default/common case) must draw
str as a single atomic string, identically to how this always worked
before this parameter existed - implementations should only fall back to a slower
per-character draw loop when this is non-zero.
fontPalette FontPalette
the resolved CSS font-palette selection (a CPAL palette index + per-entry color overrides)
for a COLR/CPAL color font; null (the default/common case) selects palette 0 with no
overrides, identical to how color-glyph drawing always worked before this parameter existed.
features System.Nullable<ShapeSettings>
which GSUB features (see ShapeSettings) to apply when shaping
str - the resolved CSS font-variant-*/font-feature-settings
values.
PdfCanvas.DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>, string) Method
See DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>, string)’s own remarks for logicalText - threaded straight through to the engine’s own string-drawing routine, the one real PDF-writing path that acts on it.
public override void DrawString(string str, PeachDrawing.Core.Font font, PeachDrawing.Core.PaintColor color, PeachDrawing.Core.PaintPoint point, PeachDrawing.Core.Size size, double letterSpacing, PeachDrawing.Core.FontPalette? fontPalette, System.Nullable<PeachDrawing.Text.Shaping.ShapeSettings> features, string? logicalText);
Parameters
str System.String
font Font
color PaintColor
point PaintPoint
size Size
letterSpacing System.Double
fontPalette FontPalette
features System.Nullable<ShapeSettings>
logicalText System.String