Grape.Rectangle Class
A Rectangle visualizer.
Constructor
Grape.Rectangle
(
-
[opts]
Parameters:
-
[opts]
Object optionalInitial values of properties
Methods
visualize
(
-
ctx
This abstract method is called each render frame if visible is set to true.
Parameters:
-
ctx
CanvasRenderingContext2DThe rendering context
Properties
alpha
Number
The alpha value set before calling the visualize method
Default: 1
backgroundColor
Number
The background color
Default: '#fff'
borderWidth
Number
The border width
Default: 1
height
Number
The height of the rectangle
Default: 0
visible
Number
If set false, the visualize method is not called.
Default: true
width
Number
The width of the rectangle
Default: 0