1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-27 08:39:00 +02:00

projection, half moulding

This commit is contained in:
Pomax
2020-08-30 17:08:43 -07:00
parent 10148f46b1
commit e6608d65af
72 changed files with 448 additions and 251 deletions

View File

@@ -436,12 +436,13 @@ class GraphicsAPI extends BaseAPI {
/**
* Reset the canvas bitmap to a uniform color.
*/
clear(color = `white`) {
clear(color = `white`, preserveTransforms = false) {
this.ctx.cacheStyle();
this.resetTransform();
this.ctx.fillStyle = color;
this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
this.ctx.restoreStyle();
if (!preserveTransforms) this.resetTransform();
}
/**