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.
 
 
 
 
 

26 lines
560 B

/**
_enyo.canvas.Image_ is a canvas control that draws an image, stretched to
fit the rectangle specified by the _bounds_ property.
*/
enyo.kind({
name: "enyo.canvas.Image",
kind: enyo.canvas.Control,
published: {
//* Source URL for the image
src: ""
},
//* @protected
create: function() {
this.image = new Image();
this.inherited(arguments);
this.srcChanged();
},
srcChanged: function() {
if (this.src) {
this.image.src = this.src;
}
},
renderSelf: function(ctx) {
ctx.drawImage(this.image, this.bounds.l, this.bounds.t);
}
});