fix
This commit is contained in:
@@ -15,9 +15,9 @@ enum FillType {
|
|||||||
|
|
||||||
class DrawUtil {
|
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;
|
if (fillType == null) fillType = FillType.DEFAULT;
|
||||||
graphics.clear();
|
if (clear) graphics.clear();
|
||||||
if (color > -1) {
|
if (color > -1) {
|
||||||
graphics.beginFill(color);
|
graphics.beginFill(color);
|
||||||
graphics.drawRect(rect.x, rect.y, rect.width, rect.height);
|
graphics.drawRect(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user