7 lines
176 B
JavaScript
7 lines
176 B
JavaScript
HTMLCanvasElement.prototype.adjustResolution = function (ctx, scale) {
|
|
this.width = this.clientWidth;
|
|
this.height = this.clientHeight;
|
|
|
|
ctx.scale(scale, scale);
|
|
};
|