mirror of https://github.com/luileito/jsketch.git
Revised saveGraphics
This commit is contained in:
parent
5a9726c104
commit
e18f23123e
|
|
@ -145,7 +145,7 @@
|
||||||
* @memberof jSketch
|
* @memberof jSketch
|
||||||
*/
|
*/
|
||||||
beginFill: function(color) {
|
beginFill: function(color) {
|
||||||
this.saveGraphics();
|
this.saveGraphics({ fillStyle: color });
|
||||||
this.context.fillStyle = color;
|
this.context.fillStyle = color;
|
||||||
this.callStack.push({ property: 'fillStyle', value: color });
|
this.callStack.push({ property: 'fillStyle', value: color });
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -393,7 +393,6 @@
|
||||||
* @memberof jSketch
|
* @memberof jSketch
|
||||||
*/
|
*/
|
||||||
beginPath: function() {
|
beginPath: function() {
|
||||||
this.saveGraphics();
|
|
||||||
this.context.beginPath();
|
this.context.beginPath();
|
||||||
this.callStack.push({ method: 'beginPath' });
|
this.callStack.push({ method: 'beginPath' });
|
||||||
return this;
|
return this;
|
||||||
|
|
@ -406,7 +405,6 @@
|
||||||
closePath: function() {
|
closePath: function() {
|
||||||
this.context.closePath();
|
this.context.closePath();
|
||||||
this.callStack.push({ method: 'closePath' });
|
this.callStack.push({ method: 'closePath' });
|
||||||
this.restoreGraphics();
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue