- scaleCanvas(domQueryOrElement): {
bounds: DOMRect;
ctx: CanvasRenderingContext2D;
element: HTMLCanvasElement;
} Parameters
- domQueryOrElement: string | HTMLCanvasElement
Returns {
bounds: DOMRect;
ctx: CanvasRenderingContext2D;
element: HTMLCanvasElement;
}
bounds: DOMRect
ctx: CanvasRenderingContext2D
element: HTMLCanvasElement
Scales a canvas to account for retina displays.
Eg:
Throws an error if
domQueryOrElement
does not resolve.w