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