(x, y, width, height, data, palette, display)
| 270 | } |
| 271 | |
| 272 | _paletteRect(x, y, width, height, data, palette, display) { |
| 273 | // Convert indexed (palette based) image data to RGB |
| 274 | const dest = this._getScratchBuffer(width * height * 4); |
| 275 | const total = width * height * 4; |
| 276 | for (let i = 0, j = 0; i < total; i += 4, j++) { |
| 277 | const sp = data[j] * 3; |
| 278 | dest[i] = palette[sp]; |
| 279 | dest[i + 1] = palette[sp + 1]; |
| 280 | dest[i + 2] = palette[sp + 2]; |
| 281 | dest[i + 3] = 255; |
| 282 | } |
| 283 | |
| 284 | display.blitImage(x, y, width, height, dest, 0, false); |
| 285 | } |
| 286 | |
| 287 | _gradientFilter(streamId, x, y, width, height, sock, display, depth) { |
| 288 | // assume the TPIXEL is 3 bytes long |
no test coverage detected