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


#########
Rectangle
#########

.. js:class:: Markup.Shapes.Rectangle

   Represents a rectangle defined by a position and a size.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Markup.Shapes.Rectangle.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Markup.Shapes.Rectangle.getBorderRadius`
   * :js:meth:`~Markup.Shapes.Rectangle.getFillColor`
   * :js:meth:`~Markup.Shapes.Rectangle.getFillOpacity`
   * :js:meth:`~Markup.Shapes.Rectangle.getPosition`
   * :js:meth:`~Markup.Shapes.Rectangle.getSize`
   * :js:meth:`~Markup.Shapes.Rectangle.getStrokeColor`
   * :js:meth:`~Markup.Shapes.Rectangle.getStrokeWidth`
   * :js:meth:`~Markup.Shapes.Rectangle.setBorderRadius`
   * :js:meth:`~Markup.Shapes.Rectangle.setFillColor`
   * :js:meth:`~Markup.Shapes.Rectangle.setFillOpacity`
   * :js:meth:`~Markup.Shapes.Rectangle.setPosition`
   * :js:meth:`~Markup.Shapes.Rectangle.setSize`
   * :js:meth:`~Markup.Shapes.Rectangle.setStrokeColor`
   * :js:meth:`~Markup.Shapes.Rectangle.setStrokeWidth`
   
   




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

.. js:method:: Markup.Shapes.Rectangle.constructor

   .. rst-class:: sig-pretty-signature
   
      | Rectangle(**position**\ : :js:class:`~Point2`\ , **size**\ : :js:class:`~Point2`\ ): :js:class:`Rectangle <Markup.Shapes.Rectangle>`
   
   Creates a new rectangle markup item
   
   **Parameters**
   
      **position**\ : :js:class:`~Point2`
   
         the screen space position of the top left of the rectangle.
   
   
      **size**\ : :js:class:`~Point2`
   
         the point object representing the width and height of the rectangle in pixels.
   
   
   
   **Returns**\ : :js:class:`Rectangle <Markup.Shapes.Rectangle>`
   





Methods
=======

.. js:method:: Markup.Shapes.Rectangle.getBorderRadius

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



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

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



.. js:method:: Markup.Shapes.Rectangle.getSize

   .. rst-class:: sig-pretty-signature
   
      | getSize(): :js:class:`~Point2`
   
   Gets rectangle size
   
   **Returns**\ : :js:class:`~Point2`
   
      the rectangle size
   
   



.. js:method:: Markup.Shapes.Rectangle.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.Rectangle.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.Rectangle.setBorderRadius

   .. rst-class:: clio-flags
   
      :clio-inherited:`inherited`
   
   .. rst-class:: sig-pretty-signature
   
      | setBorderRadius(**borderRadius**\ : *number*\ ): *void*
   
   Sets the border radius for this shape
   
   **Parameters**
   
      **borderRadius**\ : *number*
   
         the border radius in pixels
   
   
   
   **Returns**\ : *void*
   



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

   .. rst-class:: sig-pretty-signature
   
      | setPosition(**position**\ : :js:class:`~Point2`\ ): *void*
   
   Sets the rectanlge position
   
   **Parameters**
   
      **position**\ : :js:class:`~Point2`
   
         the top left corner of the rectangle
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Markup.Shapes.Rectangle.setSize

   .. rst-class:: sig-pretty-signature
   
      | setSize(**size**\ : :js:class:`~Point2`\ ): *void*
   
   Sets the rectanlge size
   
   **Parameters**
   
      **size**\ : :js:class:`~Point2`
   
         indicating the rectangle width and height
   
   
   
   **Returns**\ : *void*
   



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





