mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 19:07:59 +08:00
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:
@@ -30,7 +30,7 @@ Kinetic.TextPath.prototype = {
|
||||
// call super constructor
|
||||
Kinetic.Shape.call(this, config);
|
||||
this._setDrawFuncs();
|
||||
|
||||
|
||||
this.dataArray = Kinetic.Path.parsePathData(this.attrs.data);
|
||||
this.on('dataChange', function() {
|
||||
that.dataArray = Kinetic.Path.parsePathData(this.attrs.data);
|
||||
@@ -70,7 +70,7 @@ Kinetic.TextPath.prototype = {
|
||||
context.translate(p0.x, p0.y);
|
||||
context.rotate(glyphInfo[i].rotation);
|
||||
|
||||
this.render(context);
|
||||
this.fillStrokeText(context);
|
||||
|
||||
context.restore();
|
||||
|
||||
@@ -307,11 +307,9 @@ Kinetic.Node.addGetters(Kinetic.TextPath, ['text']);
|
||||
|
||||
// reference Text methods
|
||||
Kinetic.TextPath.prototype.fillText = Kinetic.Text.prototype.fillText;
|
||||
Kinetic.TextPath.prototype._fillTextScene = Kinetic.Text.prototype._fillTextScene;
|
||||
Kinetic.TextPath.prototype._fillTextHit = Kinetic.Text.prototype._fillTextHit;
|
||||
Kinetic.TextPath.prototype.strokeText = Kinetic.Text.prototype.strokeText;
|
||||
Kinetic.TextPath.prototype._strokeTextScene = Kinetic.Text.prototype._strokeTextScene;
|
||||
Kinetic.TextPath.prototype._strokeTextHit = Kinetic.Text.prototype._strokeTextHit;
|
||||
Kinetic.TextPath.prototype.fillStrokeText = Kinetic.Text.prototype.strokeText;
|
||||
|
||||
/**
|
||||
* set font family
|
||||
* @name setFontFamily
|
||||
|
Reference in New Issue
Block a user