Class: xrx.svg.Rect

xrx.svg. Rect

(private) new xrx.svg.Rect(element)

SVG class representing a rectangle.
Parameters:
Name Type Description
element SVGRectElement The SVG element.
Source:

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.
Source:

xrx.svg.Rect#draw(x, y, width, height, fillColor, fillOpacity, strokeColor, strokeWidth)

Draws the rectangle.
Parameters:
Name Type Description
x number The X offset.
y number The Y offset.
width number The width.
height number The height.
fillColor string The fill color.
fillOpacity number Opacity of the fill color.
strokeColor string The stroke color.
strokeWidth number The stroke width.
Source:

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
color string The fill color.
Inherited From:
Source:

xrx.svg.Rect#setFillOpacity(factor)

Sets the fill opacity of the stylable element.
Parameters:
Name Type Description
factor number The fill opacity.
Inherited From:
Source:

xrx.svg.Rect#setHeight(height)

Sets the height of the rectangle.
Parameters:
Name Type Description
height height The height.
Source:

xrx.svg.Rect#setStrokeColor(color)

Sets the stroke color of the stylable element.
Parameters:
Name Type Description
color string The stroke color.
Inherited From:
Source:

xrx.svg.Rect#setStrokeWidth(width)

Sets the stroke width of the stylable element.
Parameters:
Name Type Description
width number The stroke width.
Inherited From:
Source:

xrx.svg.Rect#setWidth(width)

Sets the width of the rectangle.
Parameters:
Name Type Description
width number The width.
Source:

xrx.svg.Rect#setX(x)

Sets the X coordinate of the rectangle.
Parameters:
Name Type Description
x number The coordinate.
Source:

xrx.svg.Rect#setY(y)

Sets the Y coordinate of the rectangle.
Parameters:
Name Type Description
y number The coordinate.
Source:

(private) xrx.svg.Rect#strokeAndFill_()

Inherited From:
Source: