MeasureString() abstract private method

Computes the metrics for a string if it were to be rendered with this renderer.
abstract private MeasureString ( string text ) : System.Vector2
text string The string.
return System.Vector2
Ejemplo n.º 1
0
 /// <summary>
 /// Measures the element, returning the size (in pixels) it would occupy if
 /// rendered with the specified renderer.
 /// </summary>
 /// <param name="renderer">The renderer.</param>
 /// <param name="element">The element.</param>
 /// <returns>The size of the element (in pixels).</returns>
 public virtual Vector2 Measure(UserInterfaceRenderer renderer, Element element)
 {
     return(renderer.MeasureString(element.Label));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Measures the element, returning the size (in pixels) it would occupy if
 /// rendered with the specified renderer.
 /// </summary>
 /// <param name="renderer">The renderer.</param>
 /// <param name="element">The element.</param>
 /// <returns>The size of the element (in pixels).</returns>
 public virtual Vector2 Measure(UserInterfaceRenderer renderer, Element element)
 {
     return renderer.MeasureString(element.Label);
 }