mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 02:37:59 +08:00
fixed up TextPath tests
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
Kinetic.Shape.call(this, config);
|
Kinetic.Shape.call(this, config);
|
||||||
|
|
||||||
// overrides
|
// overrides
|
||||||
|
// TODO: shouldn't this be on the prototype?
|
||||||
this._fillFunc = _fillFunc;
|
this._fillFunc = _fillFunc;
|
||||||
this._strokeFunc = _strokeFunc;
|
this._strokeFunc = _strokeFunc;
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
context.translate(p0.x, p0.y);
|
context.translate(p0.x, p0.y);
|
||||||
context.rotate(glyphInfo[i].rotation);
|
context.rotate(glyphInfo[i].rotation);
|
||||||
this.partialText = glyphInfo[i].text;
|
this.partialText = glyphInfo[i].text;
|
||||||
|
|
||||||
canvas.fillStroke(this);
|
canvas.fillStroke(this);
|
||||||
context.restore();
|
context.restore();
|
||||||
|
|
||||||
|
@@ -22,9 +22,9 @@ Test.Modules['TEXT PATH'] = {
|
|||||||
layer.add(path);
|
layer.add(path);
|
||||||
|
|
||||||
var textpath = new Kinetic.Plugins.TextPath({
|
var textpath = new Kinetic.Plugins.TextPath({
|
||||||
textStroke: 'black',
|
stroke: 'black',
|
||||||
textStrokeWidth: 1,
|
strokeWidth: 1,
|
||||||
textFill: 'orange',
|
fill: 'orange',
|
||||||
fontSize: '18',
|
fontSize: '18',
|
||||||
fontFamily: 'Arial',
|
fontFamily: 'Arial',
|
||||||
text: 'The quick brown fox jumped over the lazy dog\'s back',
|
text: 'The quick brown fox jumped over the lazy dog\'s back',
|
||||||
@@ -56,9 +56,9 @@ Test.Modules['TEXT PATH'] = {
|
|||||||
layer.add(path);
|
layer.add(path);
|
||||||
|
|
||||||
var textpath = new Kinetic.Plugins.TextPath({
|
var textpath = new Kinetic.Plugins.TextPath({
|
||||||
textStroke: 'black',
|
stroke: 'black',
|
||||||
textStrokeWidth: 1,
|
strokeWidth: 1,
|
||||||
textFill: 'orange',
|
fill: 'orange',
|
||||||
fontSize: '8',
|
fontSize: '8',
|
||||||
fontFamily: 'Arial',
|
fontFamily: 'Arial',
|
||||||
text: 'All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
text: 'All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
||||||
@@ -91,7 +91,7 @@ Test.Modules['TEXT PATH'] = {
|
|||||||
layer.add(path);
|
layer.add(path);
|
||||||
|
|
||||||
var textpath = new Kinetic.Plugins.TextPath({
|
var textpath = new Kinetic.Plugins.TextPath({
|
||||||
textFill: 'black',
|
fill: 'black',
|
||||||
fontSize: '10',
|
fontSize: '10',
|
||||||
text: 'All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
text: 'All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.',
|
||||||
data: c
|
data: c
|
||||||
@@ -116,7 +116,7 @@ Test.Modules['TEXT PATH'] = {
|
|||||||
|
|
||||||
var textpath = new Kinetic.Plugins.TextPath({
|
var textpath = new Kinetic.Plugins.TextPath({
|
||||||
y: 50,
|
y: 50,
|
||||||
textFill: 'black',
|
fill: 'black',
|
||||||
fontSize: '24',
|
fontSize: '24',
|
||||||
text: Array(4).join('All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.'),
|
text: Array(4).join('All the world\'s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts.'),
|
||||||
data: c
|
data: c
|
||||||
|
Reference in New Issue
Block a user