This commit is contained in:
2014-02-20 18:08:27 +04:00
parent 31b2417751
commit dc69402ab5

View File

@@ -15,9 +15,9 @@ enum FillType {
class DrawUtil {
public static function draw(graphics:Graphics, image:BitmapData, rect:Rectangle, ?fillType:FillType = null, ?color:Int = -1):Void {
public static function draw(graphics:Graphics, image:BitmapData, rect:Rectangle, ?fillType:FillType = null, ?color:Int = -1, ?clear:Bool = true):Void {
if (fillType == null) fillType = FillType.DEFAULT;
graphics.clear();
if (clear) graphics.clear();
if (color > -1) {
graphics.beginFill(color);
graphics.drawRect(rect.x, rect.y, rect.width, rect.height);