Пример #1
0
 /// <summary>
 /// Measure the width of string under max width restriction calculating the number of characters that can fit and the width those characters take.<br/>
 /// Not relevant for platforms that don't render HTML on UI element.
 /// </summary>
 /// <param name="str">the string to measure</param>
 /// <param name="font">the font to measure string with</param>
 /// <param name="maxWidth">the max width to calculate fit characters</param>
 /// <param name="charFit">the number of characters that will fit under <see cref="maxWidth"/> restriction</param>
 /// <param name="charFitWidth">the width that only the characters that fit into max width take</param>
 public abstract void MeasureString(string str, RFont font, double maxWidth, out int charFit, out double charFitWidth);
Пример #2
0
 /// <summary>
 /// Draw the given string using the given font and foreground color at given location.
 /// </summary>
 /// <param name="str">the string to draw</param>
 /// <param name="font">the font to use to draw the string</param>
 /// <param name="color">the text color to set</param>
 /// <param name="point">the location to start string draw (top-left)</param>
 /// <param name="size">used to know the size of the rendered text for transparent text support</param>
 /// <param name="rtl">is to render the string right-to-left (true - RTL, false - LTR)</param>
 public abstract void DrawString(String str, RFont font, RColor color, RPoint point, RSize size, bool rtl);
Пример #3
0
 /// <summary>
 /// Measure the width and height of string <paramref name="str"/> when drawn on device context HDC
 /// using the given font <paramref name="font"/>.
 /// </summary>
 /// <param name="str">the string to measure</param>
 /// <param name="font">the font to measure string with</param>
 /// <returns>the size of the string</returns>
 public abstract RSize MeasureString(string str, RFont font);