(private) new xrx.canvas.Polygon(canvas)
Canvas class representing a polygon.
Parameters:
Name | Type | Description |
---|---|---|
canvas |
xrx.canvas.Canvas | The parent canvas object. |
Extends
Members
-
xrx.canvas.Polygon#canvas_ :xrx.canvas.Canvas
-
The parent canvas object.
Type:
- Inherited From:
- Source:
-
xrx.canvas.Polygon#context_ :CanvasRenderingContext2D
-
The rendering context.
Type:
- CanvasRenderingContext2D
- Inherited From:
- Source:
Methods
-
(static) xrx.canvas.Polygon.create(canvas)
-
Creates a new polygon.
Parameters:
Name Type Description canvas
xrx.canvas.Canvas The parent canvas object. -
xrx.canvas.Polygon#applyTransform(matrix)
-
Applies a transformation matrix on this element.
Parameters:
Name Type Description matrix
goog.math.AffineTransform The transformation matrix. - Inherited From:
- Source:
-
xrx.canvas.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. -
(private) xrx.canvas.Polygon#drawPath_()
-
xrx.canvas.Polygon#getCanvas() → {xrx.canvas.Canvas}
-
Returns the parent canvas object.
- Inherited From:
- Source:
Returns:
The parent canvas object.- Type
- xrx.canvas.Canvas
-
xrx.canvas.Polygon#getContext() → {CanvasRenderingContext2D}
-
Returns the HTML canvas rendering context.
- Inherited From:
- Source:
Returns:
The rendering context.- Type
- CanvasRenderingContext2D
-
(private) xrx.canvas.Polygon#strokeAndFill_()
-
- Inherited From:
- Source: