.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


####
Text
####

.. js:class:: wv.Markup.Shapes.Text

   This object represents markup text that is drawn on the canvas.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Markup.Shapes.Text.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Markup.Shapes.Text.getFillColor`
   * :js:meth:`~wv.Markup.Shapes.Text.getFillOpacity`
   * :js:meth:`~wv.Markup.Shapes.Text.getFontFamily`
   * :js:meth:`~wv.Markup.Shapes.Text.getFontSize`
   * :js:meth:`~wv.Markup.Shapes.Text.getPosition`
   * :js:meth:`~wv.Markup.Shapes.Text.getStrokeColor`
   * :js:meth:`~wv.Markup.Shapes.Text.getStrokeWidth`
   * :js:meth:`~wv.Markup.Shapes.Text.getText`
   * :js:meth:`~wv.Markup.Shapes.Text.setFillColor`
   * :js:meth:`~wv.Markup.Shapes.Text.setFillOpacity`
   * :js:meth:`~wv.Markup.Shapes.Text.setFontFamily`
   * :js:meth:`~wv.Markup.Shapes.Text.setFontSize`
   * :js:meth:`~wv.Markup.Shapes.Text.setPosition`
   * :js:meth:`~wv.Markup.Shapes.Text.setStrokeColor`
   * :js:meth:`~wv.Markup.Shapes.Text.setStrokeWidth`
   * :js:meth:`~wv.Markup.Shapes.Text.setText`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.Text.constructor

      .. rst-class:: sig-pretty-signature
      
         | Text(**text**\ : *string*\ , **position**\ : :js:class:`Point2 <wv.Point2>`\ ): :js:class:`Text <wv.Markup.Shapes.Text>`
      
      Creates a new markup text item.
      
      **Parameters**
      
      
         **text**\ : *string*
      
      
            the text associated with this item.
      
      
         **position**\ : :js:class:`Point2 <wv.Point2>`
      
      
            the screen space point of the top left of the text string.
      
      
      
      **Returns**\ : :js:class:`Text <wv.Markup.Shapes.Text>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.Text.getFillColor

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getFillColor(): :js:class:`Color <wv.Color>`
      
      Gets the fill color for this shape
      
      **Returns**\ : :js:class:`Color <wv.Color>`
      
      
         the fill color
      
      



.. js:method:: wv.Markup.Shapes.Text.getFillOpacity

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getFillOpacity(): *number*
      
      Gets the fill opacity for this shape
      
      **Returns**\ : *number*
      
      
         the fill opacity
      
      



.. js:method:: wv.Markup.Shapes.Text.getFontFamily

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getFontFamily(): (*None* | *string*\ )
      
      Gets the font family for this text
      
      **Returns**\ : (*None* \| *string*\ )
      
      
         the font family
      
      



.. js:method:: wv.Markup.Shapes.Text.getFontSize

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getFontSize(): *number*
      
      Gets the font size for this text
      
      **Returns**\ : *number*
      
      
         the font size
      
      



.. js:method:: wv.Markup.Shapes.Text.getPosition

      .. rst-class:: sig-pretty-signature
      
         | getPosition(): :js:class:`Point2 <wv.Point2>`
      
      Gets the text position
      
      **Returns**\ : :js:class:`Point2 <wv.Point2>`
      
      
         the text position
      
      



.. js:method:: wv.Markup.Shapes.Text.getStrokeColor

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getStrokeColor(): :js:class:`Color <wv.Color>`
      
      Gets the stroke color for this shape
      
      **Returns**\ : :js:class:`Color <wv.Color>`
      
      
         the stroke color
      
      



.. js:method:: wv.Markup.Shapes.Text.getStrokeWidth

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getStrokeWidth(): *number*
      
      Gets the stroke width for this shape in pixels
      
      **Returns**\ : *number*
      
      
         the stroke width in pixels
      
      



.. js:method:: wv.Markup.Shapes.Text.getText

      .. rst-class:: sig-pretty-signature
      
         | getText(): *string*
      
      Gets the text content
      
      **Returns**\ : *string*
      
      
         the text content
      
      



.. js:method:: wv.Markup.Shapes.Text.setFillColor

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setFillColor(**color**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the fill color for this shape
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color <wv.Color>`
      
      
            the fill color
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setFillOpacity

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setFillOpacity(**fillOpacity**\ : *number*\ ): *void*
      
      Sets the fill opacity for this shape
      
      **Parameters**
      
      
         **fillOpacity**\ : *number*
      
      
            the fill opacity
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setFontFamily

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setFontFamily(**fontFamily**\ : *string*\ ): *void*
      
      Sets the font family this shape
      
      **Parameters**
      
      
         **fontFamily**\ : *string*
      
      
            font family to use for this text
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setFontSize

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setFontSize(**fontSize**\ : *number*\ ): *void*
      
      Sets the font size for this text
      
      **Parameters**
      
      
         **fontSize**\ : *number*
      
      
            size to use for this text
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setPosition

      .. rst-class:: sig-pretty-signature
      
         | setPosition(**position**\ : :js:class:`Point2 <wv.Point2>`\ ): *void*
      
      Sets the text position
      
      **Parameters**
      
      
         **position**\ : :js:class:`Point2 <wv.Point2>`
      
      
      **Returns**\ : *void*
      
      
         the top left position to render text from
      
      



.. js:method:: wv.Markup.Shapes.Text.setStrokeColor

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setStrokeColor(**color**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the stroke color for this shape
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color <wv.Color>`
      
      
            the stroke color
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setStrokeWidth

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setStrokeWidth(**strokeWidth**\ : *number*\ ): *void*
      
      Sets the stroke width for this shape in pixels
      
      **Parameters**
      
      
         **strokeWidth**\ : *number*
      
      
            the stroke width in pixels
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.Text.setText

      .. rst-class:: sig-pretty-signature
      
         | setText(**text**\ : *string*\ ): *void*
      
      Sets the text content
      
      **Parameters**
      
      
         **text**\ : *string*
      
      
            the text to render
      
      
      
      **Returns**\ : *void*
      




