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


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

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

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



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


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

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



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


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

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



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

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



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

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



.. js:method:: wv.Markup.Shapes.Rectangle.getStrokeColor

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



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

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



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

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



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

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



.. js:method:: wv.Markup.Shapes.Rectangle.setStrokeColor

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



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




