not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
662 B

//* _enyo.canvas.Text_ is a canvas control that draws a text string.
enyo.kind({
name: "enyo.canvas.Text",
kind: enyo.canvas.Shape,
published: {
//* The text to draw
text: "",
//* CSS font specification used to select a font for drawing
font: "12pt Arial",
//* Text alignment within the rectangle specified by the _bounds_ property
align: "left"
},
//* @protected
renderSelf: function(ctx) {
ctx.textAlign = this.align;
ctx.font = this.font;
this.draw(ctx);
},
fill: function(ctx) {
ctx.fillText(this.text, this.bounds.l, this.bounds.t);
},
outline: function(ctx) {
ctx.strokeText(this.text, this.bounds.l, this.bounds.t);
}
});