Optional
Use if canvas.width !== canvas.clientWidth or height and rect is based on client rect
Generated using TypeDoc
Use if canvas.width !== canvas.clientWidth or height and rect is based on client rect