소스 검색

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