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
702 B

/**
_enyo.canvas.Rectangle_ is a canvas control that draws a rectangle fitting
the parameters specified in the _bounds_ property.
*/
enyo.kind({
name: "enyo.canvas.Rectangle",
kind: enyo.canvas.Shape,
published: {
//* if true, clear the area of the rectangle instead of drawing it
clear: false
},
//* @protected
renderSelf: function(ctx) {
if (this.clear) {
ctx.clearRect(this.bounds.l, this.bounds.t, this.bounds.w, this.bounds.h);
} else {
this.draw(ctx);
}
},
fill: function(ctx) {
ctx.fillRect(this.bounds.l, this.bounds.t, this.bounds.w, this.bounds.h);
},
outline: function(ctx) {
ctx.strokeRect(this.bounds.l, this.bounds.t, this.bounds.w, this.bounds.h);
}
});