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:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user