mirror of https://github.com/luileito/jsketch.git
Playing with radialCircle
This commit is contained in:
parent
d57c92f37c
commit
3c5e2ee4ea
16
jsketch.js
16
jsketch.js
|
|
@ -309,13 +309,15 @@
|
||||||
this.graphics.closePath();
|
this.graphics.closePath();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
// experimental
|
/**
|
||||||
radialCircle: function(x,y,radius,color,glowSize){
|
* Experimental.
|
||||||
var g = this.graphics.createRadialGradient(x,y,radius,x,y,glowSize);
|
* @ignore
|
||||||
g.addColorStop(0,color);
|
*/
|
||||||
g.addColorStop(1.0,"rgba(0,0,0,0)");
|
radialCircle: function(x,y,radius,glowSize,color1,color2) {
|
||||||
this.graphics.fillStyle = g;
|
var g = this.graphics.createRadialGradient(x,y,radius,x,y, glowSize || 5);
|
||||||
this.fillCircle(x,y,radius);
|
g.addColorStop(0, color1 || this.graphics.fillStyle);
|
||||||
|
g.addColorStop(1, color2 || 'white');
|
||||||
|
this.beginFill(g).fillCircle(x,y,radius).endFill();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue