Table of Contents

Method MeasureLine

Namespace
Alternet.Editor.Wpf
Assembly
Alternet.Editor.Wpf.v9.dll

MeasureLine(int, int, int)

Measures part of the string given at by its index.

public virtual double MeasureLine(int index, int pos, int len)

Parameters

index int

Index of line to measure.

pos int

Start character of string to measure.

len int

Number of characters to measure.

Returns

double

Width of the measured part of the string.

MeasureLine(int, int, int, double, out int, bool)

Measures part of the string given by its index.

public virtual double MeasureLine(int index, int pos, int len, double width, out int chars, bool exact)

Parameters

index int

Index of line to measure.

pos int

Start character of string to measure.

len int

Number of characters to measure.

width double

Maximum length of the string.

chars int

Receive real number of measured chars.

exact bool

Specifies whether the calculating should be precise.

Returns

double

Width of the measured part of the string.

MeasureLine(string, StringItemInfo[], int, int)

Measures part of given string.

public virtual double MeasureLine(string line, StringItemInfo[] colorData, int pos, int len)

Parameters

line string

Text to measure.

colorData StringItemInfo[]

Color data attached to the given string.

pos int

Start character of string to measure.

len int

Number of characters to measure.

Returns

double

Width of the measured part of the string.

MeasureLine(string, StringItemInfo[], int, int, double, out int, bool, bool, bool)

Measures part of given string.

public virtual double MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, double width, out int chars, bool measureChars, bool addSpace, bool exact)

Parameters

line string

Text to measure.

colorData StringItemInfo[]

Color data attached to the given string.

pos int

Start character of string to measure.

len int

Number of characters to measure.

width double

Maximum length of the string.

chars int

Receive real number of measured chars.

measureChars bool

Specifies whether the method should measure how much characters fits to the given width.

addSpace bool

Specifies whether spaces are added to the end of string if needed.

exact bool

Specifies whether the calculating should be precise.

Returns

double

Width of the measured part of the string.

MeasureLine(string, StringItemInfo[], int, int, double, out int, bool)

Measures part of given string.

public double MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, double width, out int chars, bool exact)

Parameters

line string

Text to measure.

colorData StringItemInfo[]

Color data attached to the given string.

pos int

Start character of string to measure.

len int

Number of characters to measure.

width double

Maximum length of the string.

chars int

Receive real number of measured chars.

exact bool

Specifies whether the calculating should be precise.

Returns

double

Width of the measured part of the string.