.. role:: ts-api-decorator

#################
TextBoxCollection
#################

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

.. container:: ts-api-section

   .. js:class:: TextBoxCollection

      This class is useful for drawing a number of text boxes which share the same visual settings.



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Markup.Shapes.TextBoxCollection.addString`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.clear`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.getBoxPortion`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.getPadding`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.getStrings`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.getTextPortion`
   * :js:meth:`~Markup.Shapes.TextBoxCollection.setPadding`





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

Methods
=======

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

addString
---------

.. js:method:: TextBoxCollection.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:: TextBoxCollection.clear()



   Removes all text strings from this collection


   :rtype: void

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

getBoxPortion
-------------

.. js:method:: TextBoxCollection.getBoxPortion()



   Gets the Box portion of the TextBox. Use the methods on this object to modify the appearance of the rectangle around the text string

   :returns: the rectangle markup object.


   :rtype: RectangleBase

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

getPadding
----------

.. js:method:: TextBoxCollection.getPadding()



   Gets the Pixel distance between the text and outer rectangle

   :returns: the padding value.


   :rtype: number

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

getStrings
----------

.. js:method:: TextBoxCollection.getStrings()



   Gets the strings in the collection


   :rtype: [_MarkupTextData]

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

getTextPortion
--------------

.. js:method:: TextBoxCollection.getTextPortion()



   Gets the Text portion of the TextBox. Use the methods on this object to modify the appearance of the text string

   :returns: the text markup object


   :rtype: TextMarkupBase

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

setPadding
----------

.. js:method:: TextBoxCollection.setPadding( padding)

   :param padding: the padding value.
   :type padding: number


   Sets the Pixel distance between the text and outer rectangle


   :rtype: void

