Canvaslike
type Canvaslike = { clientHeight?: number; clientWidth?: number; height: number; style?: { height: string; width: string; }; width: number; getContext: | CanvaslikeRenderingContext2D | null;};Any Canvas-like interface. We’ve typed it minimally so that server based canvas implementations don’t complain.
Properties
Section titled “Properties”| Property | Type |
|---|---|
clientHeight? |
number |
clientWidth? |
number |
height |
number |
style? |
{ height: string; width: string; } |
style.height |
string |
style.width |
string |
width |
number |
Methods
Section titled “Methods”getContext()
Section titled “getContext()”getContext(type: "2d", options?: { alpha?: boolean;}): | CanvaslikeRenderingContext2D | null;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type |
"2d" |
options? |
{ alpha?: boolean; } |
options.alpha? |
boolean |
Returns
Section titled “Returns”| CanvaslikeRenderingContext2D
| null