Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (11 sloc) 577 Bytes
An.object().named('Circle').plural('Circles').from(Graphic).
has('x',0).has('y',0).has('width',0).has('height',0).has('radius',0).
does('init', function() { return this.clone().size(20).instance().here() }).
does('size', function(R) { return this.by(R*2,R*2).has('radius', 1*R) })
does('draw', function() {
if(!this.visible()) return;
var R = Screen.radius(); // save screen radius
Screen.save().color(this.red(),this.green(),this.blue(),this.alpha()).radius(this.radius())
Screen.at(this.x()+this.radius(),this.y()+this.radius()).circle().radius(R)
Screen.restore()
})