Method MeasureLine
MeasureLine(int, int, int)
Measures part of the string given at by its index.
public virtual int MeasureLine(int index, int pos, int len)
Parameters
indexintIndex of line to measure.
posintStart character of string to measure.
lenintNumber of characters to measure.
Returns
- int
Width of the measured part of the string.
MeasureLine(int, int, int, int, out int, bool)
Measures part of the string given by its index.
public virtual int MeasureLine(int index, int pos, int len, int width, out int chars, bool exact)
Parameters
indexintIndex of line to measure.
posintStart character of string to measure.
lenintNumber of characters to measure.
widthintMaximum length of the string.
charsintReceive real number of measured chars.
exactboolSpecifies whether the calculating should be precise.
Returns
- int
Width of the measured part of the string.
MeasureLine(string, StringItemInfo[], int, int)
Measures part of given string.
public virtual int MeasureLine(string line, StringItemInfo[] colorData, int pos, int len)
Parameters
linestringText to measure.
colorDataStringItemInfo[]Color data attached to the given string.
posintStart character of string to measure.
lenintNumber of characters to measure.
Returns
- int
Width of the measured part of the string.
MeasureLine(string, StringItemInfo[], int, int, int, out int, bool, bool, bool)
Measures part of given string.
public virtual int MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, int width, out int chars, bool measureChars, bool addSpace, bool exact)
Parameters
linestringText to measure.
colorDataStringItemInfo[]Color data attached to the given string.
posintStart character of string to measure.
lenintNumber of characters to measure.
widthintMaximum length of the string.
charsintReceive real number of measured chars.
measureCharsboolSpecifies whether the method should measure how much characters fits to the given width.
addSpaceboolSpecifies whether spaces are added to the end of string if needed.
exactboolSpecifies whether the calculating should be precise.
Returns
- int
Width of the measured part of the string.
MeasureLine(string, StringItemInfo[], int, int, int, out int, bool)
Measures part of given string.
public int MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, int width, out int chars, bool exact)
Parameters
linestringText to measure.
colorDataStringItemInfo[]Color data attached to the given string.
posintStart character of string to measure.
lenintNumber of characters to measure.
widthintMaximum length of the string.
charsintReceive real number of measured chars.
exactboolSpecifies whether the calculating should be precise.
Returns
- int
Width of the measured part of the string.
MeasureLine(int, int, int, double, out int, bool)
public virtual double MeasureLine(int index, int pos, int len, double width, out int chars, bool exact)
Parameters
Returns
MeasureLine(string, StringItemInfo[], int, int, double, out int, bool, bool, bool)
public virtual double MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, double width, out int chars, bool measureChars, bool addSpace, bool exact)
Parameters
linestringcolorDataStringItemInfo[]posintlenintwidthdoublecharsintmeasureCharsbooladdSpaceboolexactbool
Returns
MeasureLine(string, StringItemInfo[], int, int, double, out int, bool)
public double MeasureLine(string line, StringItemInfo[] colorData, int pos, int len, double width, out int chars, bool exact)