//TODO: fix void fillRect(uint8_t red, uint8_t green, uint8_t blue, uint32_t width, uint32_t height) { uint32_t *addr = lfb_address; Pixel pixel = createPixel(red, green, blue); for (int i = 0; i < height; ++i) { for (int o = 0; o < width; ++o) { addr[o + i*horizontalResolution] = pixel; } } }
void Bitmap::fill(float r, float g, float b, float a) { int pixelPitch = pitch / sizeof(DWORD); DWORD pixel = createPixel(r, g, b, a); DWORD *pPixels = reinterpret_cast<DWORD*>(m_pBits); for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) pPixels[y * pixelPitch + x] = pixel; } }