# RectangleCollection

class Markup.Shapes.RectangleCollection()

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

Constructors

- `constructor()`

Methods

- `addRectangle()`

- `clear()`

- `getBorderRadius()`

- `getFillColor()`

- `getFillOpacity()`

- `getRectangles()`

- `getStrokeColor()`

- `getStrokeWidth()`

- `setBorderRadius()`

- `setFillColor()`

- `setFillOpacity()`

- `setStrokeColor()`

- `setStrokeWidth()`

## Constructors

RectangleCollection.constructor()
  Return type

    RectangleCollection

## Methods

### addRectangle

RectangleCollection.addRectangle(position, size)
  Arguments

    - position (`Point2()`) – the top left corner of the rectangle

    - size (`Point2()`) – indicating the rectangle width and height

  Adds a rectangle to the collection

  Return type

    void

### clear

RectangleCollection.clear()

  Removes all rectangles from this collection

  Return type

    void

### getBorderRadius

RectangleCollection.getBorderRadius()

  Gets the border radius for this shape

  Returns

    the border radius

  Return type

    number

### getFillColor

RectangleCollection.getFillColor()

  Gets the fill color for this shape

  Returns

    the fill color

  Return type

    Color

### getFillOpacity

RectangleCollection.getFillOpacity()

  Gets the fill opacity for this shape

  Returns

    the fill opacity

  Return type

    number

### getRectangles

RectangleCollection.getRectangles()

  Gets the rectangles in the collection

  Return type

    [_MarkupRectangleData]

### getStrokeColor

RectangleCollection.getStrokeColor()

  Gets the stroke color for this shape

  Returns

    the stroke color

  Return type

    Color

### getStrokeWidth

RectangleCollection.getStrokeWidth()

  Gets the stroke width for this shape in pixels

  Returns

    the stroke width in pixels

  Return type

    number

### setBorderRadius

RectangleCollection.setBorderRadius(borderRadius)
  Arguments

    - borderRadius (`number()`) – the border radius in pixels

  Sets the border radius for this shape

  Return type

    void

### setFillColor

RectangleCollection.setFillColor(color)
  Arguments

    - color (`Color()`) – the fill color

  Sets the fill color for this shape

  Return type

    void

### setFillOpacity

RectangleCollection.setFillOpacity(fillOpacity)
  Arguments

    - fillOpacity (`number()`) – the fill opacity

  Sets the fill opacity for this shape

  Return type

    void

### setStrokeColor

RectangleCollection.setStrokeColor(color)
  Arguments

    - color (`Color()`) – the stroke color

  Sets the stroke color for this shape

  Return type

    void

### setStrokeWidth

RectangleCollection.setStrokeWidth(strokeWidth)
  Arguments

    - strokeWidth (`number()`) – the stroke width in pixels

  Sets the stroke width for this shape in pixels

  Return type

    void