finished up new Scene and Hit Renderers. added new textShadow attrs for more flexibility. Added new fillStroke() method which encapsulates shadow application logic

This commit is contained in:
Eric Rowell
2012-11-23 14:54:32 -08:00
parent 144e95ad42
commit 318d03feb7
16 changed files with 308 additions and 291 deletions

View File

@@ -35,11 +35,6 @@ Kinetic.Sprite.prototype = {
var index = this.attrs.index;
var f = this.attrs.animations[anim][index];
context.beginPath();
context.rect(0, 0, f.width, f.height);
context.closePath();
this.render(context);
if(this.attrs.image) {
context.beginPath();
@@ -57,8 +52,7 @@ Kinetic.Sprite.prototype = {
context.beginPath();
context.rect(0, 0, f.width, f.height);
context.closePath();
this.fill(context, this.getFill(), null);
this.stroke(context, this.getStroke(), this.getStrokeWidth(), null);
this.fillStroke(context);
},
/**
* start sprite animation