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


####
Text
####

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

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




Constructors
============

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

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





Methods
=======

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

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



.. js:method:: 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:: 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:: 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:: Markup.Shapes.Text.getPosition

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



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

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



.. js:method:: 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:: Markup.Shapes.Text.getText

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



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

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



.. js:method:: 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:: 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:: 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:: Markup.Shapes.Text.setPosition

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



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

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



.. js:method:: 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:: 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*
   





