(private) new xrx.svg.Polygon(element)
SVG class representing a polygon.
Parameters:
Name | Type | Description |
---|---|---|
element |
SVGPolygonElement | The SVG polygon element. |
Extends
Members
-
xrx.svg.Polygon#element_ :SVGElement
-
The SVG element.
Type:
- SVGElement
- Inherited From:
- Source:
Methods
-
(static) xrx.svg.Polygon.create()
-
Creates a new polygon.
-
xrx.svg.Polygon#draw(coords, fillColor, fillOpacity, strokeColor, strokeWidth)
-
Draws the polygon.
Parameters:
Name Type Description coords
Array.<number> The polygon's coordinates. fillColor
string The fill color. fillOpacity
number Opacity of the fill color. strokeColor
string The stroke color. strokeWidth
number The stroke width. -
xrx.svg.Polygon#getElement() → {SVGElement}
-
Returns the SVG element.
- Inherited From:
- Source:
Returns:
The SVG element.- Type
- SVGElement
-
xrx.svg.Polygon#setCoords(coords)
-
Sets the coordinates for the polygon.
Parameters:
Name Type Description coords
Array.<number> The coordinates. -
xrx.svg.Polygon#setFillColor(color)
-
Sets the fill color of the stylable element.
Parameters:
Name Type Description color
string The fill color. - Inherited From:
- Source:
-
xrx.svg.Polygon#setFillOpacity(factor)
-
Sets the fill opacity of the stylable element.
Parameters:
Name Type Description factor
number The fill opacity. - Inherited From:
- Source:
-
xrx.svg.Polygon#setStrokeColor(color)
-
Sets the stroke color of the stylable element.
Parameters:
Name Type Description color
string The stroke color. - Inherited From:
- Source:
-
xrx.svg.Polygon#setStrokeWidth(width)
-
Sets the stroke width of the stylable element.
Parameters:
Name Type Description width
number The stroke width. - Inherited From:
- Source:
-
(private) xrx.svg.Polygon#strokeAndFill_()
-
- Inherited From:
- Source: