Class: xrx.canvas.Rect

xrx.canvas. Rect

(private) new xrx.canvas.Rect(canvas)

Canvas class representing a rectangle.
Parameters:
Name Type Description
canvas xrx.canvas.Canvas The parent canvas object.
Source:

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
canvas xrx.canvas.Canvas The parent canvas object.
Source:

xrx.canvas.Rect#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.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:

(private) xrx.canvas.Rect#drawPath_()

Source:

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: