浏览代码

reset hl bytes with 0

ncannasse 8 年之前
父节点
当前提交
ed6f4057d0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hxd/BitmapData.hx

+ 1 - 0
hxd/BitmapData.hx

@@ -61,6 +61,7 @@ class BitmapData {
 			data = new BitmapInnerData();
 			#if hl
 			data.pixels = new hl.Bytes(width * height * 4);
+			(data.pixels:hl.Bytes).fill(0, width * height * 4, 0);
 			#else
 			data.pixels = new haxe.ds.Vector(width * height);
 			#end