Explorar o código

Add setPixel for r8

ShiroSmith %!s(int64=5) %!d(string=hai) anos
pai
achega
8ca6f4688e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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: