.. role:: ts-api-decorator

##############
TextCollection
##############

.. js:module:: Markup.Shapes
   :noindex:

.. container:: ts-api-section

   .. js:class:: TextCollection

      This is a base class for text markup objects. It should not be created directly.



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Markup.Shapes.TextCollection.addString`
   * :js:meth:`~Markup.Shapes.TextCollection.clear`
   * :js:meth:`~Markup.Shapes.TextCollection.getFillColor`
   * :js:meth:`~Markup.Shapes.TextCollection.getFillOpacity`
   * :js:meth:`~Markup.Shapes.TextCollection.getFontFamily`
   * :js:meth:`~Markup.Shapes.TextCollection.getFontSize`
   * :js:meth:`~Markup.Shapes.TextCollection.getStrings`
   * :js:meth:`~Markup.Shapes.TextCollection.getStrokeColor`
   * :js:meth:`~Markup.Shapes.TextCollection.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.TextCollection.setFillColor`
   * :js:meth:`~Markup.Shapes.TextCollection.setFillOpacity`
   * :js:meth:`~Markup.Shapes.TextCollection.setFontFamily`
   * :js:meth:`~Markup.Shapes.TextCollection.setFontSize`
   * :js:meth:`~Markup.Shapes.TextCollection.setStrokeColor`
   * :js:meth:`~Markup.Shapes.TextCollection.setStrokeWidth`





------------

Methods
=======

.. rst-class:: ts-api-section

addString
---------

.. js:method:: TextCollection.addString( text, position)

   :param text: the text to render
   :type text: string
   :param position: the top left position of the text
   :type position: Point2


   Adds a string to the collection


   :rtype: void

.. rst-class:: ts-api-section

clear
-----

.. js:method:: TextCollection.clear()



   Removes all text strings from this collection


   :rtype: void

.. rst-class:: ts-api-section

getFillColor
------------

.. js:method:: TextCollection.getFillColor()



   Gets the fill color for this shape

   :returns: the fill color


   :rtype: Color

.. rst-class:: ts-api-section

getFillOpacity
--------------

.. js:method:: TextCollection.getFillOpacity()



   Gets the fill opacity for this shape

   :returns: the fill opacity


   :rtype: number

.. rst-class:: ts-api-section

getFontFamily
-------------

.. js:method:: TextCollection.getFontFamily()



   Gets the font family for this text

   :returns: the font family


   :rtype: null | string

.. rst-class:: ts-api-section

getFontSize
-----------

.. js:method:: TextCollection.getFontSize()



   Gets the font size for this text

   :returns: the font size


   :rtype: number

.. rst-class:: ts-api-section

getStrings
----------

.. js:method:: TextCollection.getStrings()



   Gets the strings in the collection


   :rtype: [_MarkupTextData]

.. rst-class:: ts-api-section

getStrokeColor
--------------

.. js:method:: TextCollection.getStrokeColor()



   Gets the stroke color for this shape

   :returns: the stroke color


   :rtype: Color

.. rst-class:: ts-api-section

getStrokeWidth
--------------

.. js:method:: TextCollection.getStrokeWidth()



   Gets the stroke width for this shape in pixels

   :returns: the stroke width in pixels


   :rtype: number

.. rst-class:: ts-api-section

setFillColor
------------

.. js:method:: TextCollection.setFillColor( color)

   :param color: the fill color
   :type color: Color


   Sets the fill color for this shape


   :rtype: void

.. rst-class:: ts-api-section

setFillOpacity
--------------

.. js:method:: TextCollection.setFillOpacity( fillOpacity)

   :param fillOpacity: the fill opacity
   :type fillOpacity: number


   Sets the fill opacity for this shape


   :rtype: void

.. rst-class:: ts-api-section

setFontFamily
-------------

.. js:method:: TextCollection.setFontFamily( fontFamily)

   :param fontFamily: font family to use for this text
   :type fontFamily: string


   Sets the font family this shape


   :rtype: void

.. rst-class:: ts-api-section

setFontSize
-----------

.. js:method:: TextCollection.setFontSize( fontSize)

   :param fontSize: size to use for this text
   :type fontSize: number


   Sets the font size for this text


   :rtype: void

.. rst-class:: ts-api-section

setStrokeColor
--------------

.. js:method:: TextCollection.setStrokeColor( color)

   :param color: the stroke color
   :type color: Color


   Sets the stroke color for this shape


   :rtype: void

.. rst-class:: ts-api-section

setStrokeWidth
--------------

.. js:method:: TextCollection.setStrokeWidth( strokeWidth)

   :param strokeWidth: the stroke width in pixels
   :type strokeWidth: number


   Sets the stroke width for this shape in pixels


   :rtype: void

