mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Use CanvasProvider in Document to produce canvas.
This commit is contained in:
parent
81461764a5
commit
26111da357
1 changed files with 1 additions and 3 deletions
|
@ -23,9 +23,7 @@ var Document = this.Document = Base.extend({
|
|||
this.size = new Size(canvas.offsetWidth, canvas.offsetHeight);
|
||||
} else {
|
||||
this.size = Size.read(arguments) || new Size(1024, 768);
|
||||
this.canvas = document.createElement('canvas');
|
||||
this.canvas.width = this.size.width;
|
||||
this.canvas.height = this.size.height;
|
||||
this.canvas = CanvasProvider.getCanvas(this.size);
|
||||
}
|
||||
this.bounds = new Rectangle(new Point(0, 0), this.size);
|
||||
this.context = this.canvas.getContext('2d');
|
||||
|
|
Loading…
Reference in a new issue