(private) new xrx.svg.Rect(element)
SVG class representing a rectangle.
Parameters:
| Name | Type | Description |
|---|---|---|
element |
SVGRectElement | The SVG element. |
Extends
Members
-
xrx.svg.Rect#element_ :SVGElement
-
The SVG element.
Type:
- SVGElement
- Inherited From:
- Source:
Methods
-
(static) xrx.svg.Rect.create()
-
Creates a new rectangle.
-
xrx.svg.Rect#draw(x, y, width, height, fillColor, fillOpacity, strokeColor, strokeWidth)
-
Draws the rectangle.
Parameters:
Name Type Description xnumber The X offset. ynumber The Y offset. widthnumber The width. heightnumber The height. fillColorstring The fill color. fillOpacitynumber Opacity of the fill color. strokeColorstring The stroke color. strokeWidthnumber The stroke width. -
xrx.svg.Rect#getElement() → {SVGElement}
-
Returns the SVG element.
- Inherited From:
- Source:
Returns:
The SVG element.- Type
- SVGElement
-
xrx.svg.Rect#setFillColor(color)
-
Sets the fill color of the stylable element.
Parameters:
Name Type Description colorstring The fill color. - Inherited From:
- Source:
-
xrx.svg.Rect#setFillOpacity(factor)
-
Sets the fill opacity of the stylable element.
Parameters:
Name Type Description factornumber The fill opacity. - Inherited From:
- Source:
-
xrx.svg.Rect#setHeight(height)
-
Sets the height of the rectangle.
Parameters:
Name Type Description heightheight The height. -
xrx.svg.Rect#setStrokeColor(color)
-
Sets the stroke color of the stylable element.
Parameters:
Name Type Description colorstring The stroke color. - Inherited From:
- Source:
-
xrx.svg.Rect#setStrokeWidth(width)
-
Sets the stroke width of the stylable element.
Parameters:
Name Type Description widthnumber The stroke width. - Inherited From:
- Source:
-
xrx.svg.Rect#setWidth(width)
-
Sets the width of the rectangle.
Parameters:
Name Type Description widthnumber The width. -
xrx.svg.Rect#setX(x)
-
Sets the X coordinate of the rectangle.
Parameters:
Name Type Description xnumber The coordinate. -
xrx.svg.Rect#setY(y)
-
Sets the Y coordinate of the rectangle.
Parameters:
Name Type Description ynumber The coordinate. -
(private) xrx.svg.Rect#strokeAndFill_()
-
- Inherited From:
- Source: