diff --git a/haxework/gui/utils/DrawUtil.hx b/haxework/gui/utils/DrawUtil.hx index 1aa3e22..a7cbaf9 100755 --- a/haxework/gui/utils/DrawUtil.hx +++ b/haxework/gui/utils/DrawUtil.hx @@ -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);