new ErrorCell()
Extends
Methods
paint(gc, config)
Writes error message into cell.
This function is guaranteed to be called as follows:
gc.save();
gc.beginPath();
gc.rect(x, y, width, height);
gc.clip();
behavior.getCellProvider().renderCellError(gc, message, x, y, width, height);
gc.restore();
Before doing anything else, this function should clear the cell by setting gc.fillStyle
and calling gc.fill()
.
Parameters:
Name | Type | Description |
---|---|---|
gc |
CanvasRenderingContext2D | |
config |
object | |
config.bounds |
Rectangle | The clipping rect of the cell to be rendered. |
- Overrides:
roundRect(gc, x, y, width, height, radius, fill, stroke)
A simple implementation of rounding a cell.
Parameters:
Name | Type | Description |
---|---|---|
gc |
CanvasRenderingContext2D | |
x |
number | the x grid coordinate of my origin |
y |
number | the y grid coordinate of my origin |
width |
number | the width I'm allowed to draw within |
height |
number | the height I'm allowed to draw within |
radius |
number | |
fill |
number | |
stroke |
number |
- Inherited From: