flash on 2010-1-8
♥0 |
Line 32 |
Modified 2010-01-08 12:14:30 |
MIT License
archived:2017-03-20 15:14:41
ActionScript3 source code
/**
* Copyright hacker_yk666qry ( http://wonderfl.net/user/hacker_yk666qry )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/xYWu
*/
package {
import flash.display.Sprite;
public interface Draw {
function myDraw():String;
}
}
public class DrawCircle implements Draw {
private var centerX:int;
private var centerY:int;
private var radius:int;
public function DrawCircle() {
}
public function myDraw(centerX, centerY, radius):void {
graphics.beginFill(0x0000ff);
graphics.drawCircle(centerX, centerY, radius);
graphics.endFill();
}
}
public class DrawRect implements Draw {
private var rectAngleX:int;
private var rectAngleY:int;
private var rectWidth:int;
private var rectHeight:int;
public function DrawRect() {
}
public function myDraw(rectAngleX, rectAngleY, rectWidth, rectHeight) {
graphics.beginFill(0xff0000);
graphics.drawRect(rectAngleX, rectAngleY, rectWidth, rectHeight);
graphics.endFill();
}
}