static void srcover_rect(const GBitmap& bitmap, const GIRect& rect, const GPixel& color) { unsigned a = GPixel_GetA(color); if (0 == a) { return; } RowProc proc = (255 == a) ? src_row : srcover_row; const int width = rect.width(); for (int y = rect.top(); y < rect.bottom(); ++y) { proc(get_addr(bitmap, rect.x(), y), width, color); } }
static void src_rect(const GBitmap& bitmap, const GIRect& rect, const GPixel& color) { const int width = rect.width(); for (int y = rect.top(); y < rect.bottom(); ++y) { src_row(get_addr(bitmap, rect.x(), y), width, color); } }