浏览代码

Add setPixel for r8

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

+ 2 - 0
hxd/Pixels.hx

@@ -421,6 +421,8 @@ class Pixels {
 		var p = ((x + yflip(y) * width) * bytesPerPixel) + offset;
 		willChange();
 		switch(format) {
+		case R8:
+			bytes.set(p, color);
 		case BGRA:
 			bytes.setInt32(p, color);
 		case RGBA: