Browse Source

Add setPixel for r8

ShiroSmith 5 years ago
parent
commit
8ca6f4688e
1 changed files with 2 additions and 0 deletions
  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;
 		var p = ((x + yflip(y) * width) * bytesPerPixel) + offset;
 		willChange();
 		willChange();
 		switch(format) {
 		switch(format) {
+		case R8:
+			bytes.set(p, color);
 		case BGRA:
 		case BGRA:
 			bytes.setInt32(p, color);
 			bytes.setInt32(p, color);
 		case RGBA:
 		case RGBA: