Table of Contents

Method DrawStrings

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

DrawStrings(RectD, Font, IEnumerable<string>?, TextHorizontalAlignment, double, Color?, Color?)

Draws range of strings.

public virtual SizeD DrawStrings(RectD rect, Font font, IEnumerable<string>? wrappedText, TextHorizontalAlignment textHorizontalAlignment = TextHorizontalAlignment.Left, double lineDistance = 0, Color? foreColor = null, Color? backColor = null)

Parameters

rect RectD

The bounding rectangle used to specify location and maximal width of the text. Height of the rectangle is not used. If width of the rectangle is not specified textHorizontalAlignment is not used.

font Font

The font used to draw the text.

wrappedText IEnumerable<string>

The text to draw.

textHorizontalAlignment TextHorizontalAlignment

The horizontal alignment of the text

lineDistance double

The vertical distance between the lines of text. Optional. If not specified, 0 is used.

foreColor Color

The foreground color of the text. If null, text will be only measured and no drawing will be performed.

backColor Color

The background color of the text.

Returns

SizeD