Package com.google.gwt.canvas.dom.client

## Class TextMetrics

- java.lang.Object
- - com.google.gwt.core.client.JavaScriptObject
  - - com.google.gwt.canvas.dom.client.TextMetrics

-     public class TextMetrics
      extends JavaScriptObject

  HTML 5 Canvas text metrics.
  See Also:
    HTML Canvas 2D TextMetrics

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `TextMetrics()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `double` | `getWidth()` | Return the width of the rendered text.

    - ### Methods inherited from class com.google.gwt.core.client.JavaScriptObject

      `cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TextMetrics

          protected TextMetrics()

  - ### Method Detail

    - #### getWidth

          public final double getWidth()

      Return the width of the rendered text.
      Returns:
        the width of the text