.. role:: ts-api-decorator

###################
RectangleCollection
###################

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

.. container:: ts-api-section

   .. js:class:: RectangleCollection

      This is useful for drawing a number of rectangles which share the same visual appearance.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~Markup.Shapes.RectangleCollection.constructor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~Markup.Shapes.RectangleCollection.addRectangle`
   * :js:meth:`~Markup.Shapes.RectangleCollection.clear`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getBorderRadius`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getFillColor`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getFillOpacity`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getRectangles`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getStrokeColor`
   * :js:meth:`~Markup.Shapes.RectangleCollection.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.RectangleCollection.setBorderRadius`
   * :js:meth:`~Markup.Shapes.RectangleCollection.setFillColor`
   * :js:meth:`~Markup.Shapes.RectangleCollection.setFillOpacity`
   * :js:meth:`~Markup.Shapes.RectangleCollection.setStrokeColor`
   * :js:meth:`~Markup.Shapes.RectangleCollection.setStrokeWidth`





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

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

.. container:: ts-api-section

   .. js:function:: RectangleCollection.constructor()



      :rtype: RectangleCollection



Methods
=======

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

addRectangle
------------

.. js:method:: RectangleCollection.addRectangle( position, size)

   :param position: the top left corner of the rectangle
   :type position: Point2
   :param size: indicating the rectangle width and height
   :type size: Point2


   Adds a rectangle to the collection


   :rtype: void

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

clear
-----

.. js:method:: RectangleCollection.clear()



   Removes all rectangles from this collection


   :rtype: void

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

getBorderRadius
---------------

.. js:method:: RectangleCollection.getBorderRadius()



   Gets the border radius for this shape

   :returns: the border radius


   :rtype: number

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

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

.. js:method:: RectangleCollection.getFillColor()



   Gets the fill color for this shape

   :returns: the fill color


   :rtype: Color

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

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

.. js:method:: RectangleCollection.getFillOpacity()



   Gets the fill opacity for this shape

   :returns: the fill opacity


   :rtype: number

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

getRectangles
-------------

.. js:method:: RectangleCollection.getRectangles()



   Gets the rectangles in the collection


   :rtype: [_MarkupRectangleData]

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

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

.. js:method:: RectangleCollection.getStrokeColor()



   Gets the stroke color for this shape

   :returns: the stroke color


   :rtype: Color

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

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

.. js:method:: RectangleCollection.getStrokeWidth()



   Gets the stroke width for this shape in pixels

   :returns: the stroke width in pixels


   :rtype: number

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

setBorderRadius
---------------

.. js:method:: RectangleCollection.setBorderRadius( borderRadius)

   :param borderRadius: the border radius in pixels
   :type borderRadius: number


   Sets the border radius for this shape


   :rtype: void

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

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

.. js:method:: RectangleCollection.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:: RectangleCollection.setFillOpacity( fillOpacity)

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


   Sets the fill opacity for this shape


   :rtype: void

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

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

.. js:method:: RectangleCollection.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:: RectangleCollection.setStrokeWidth( strokeWidth)

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


   Sets the stroke width for this shape in pixels


   :rtype: void

