mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibGfx: Correctly handle source rect offset in draw_scaled_bitmap
The do_draw_integer_scaled_bitmap() fastpath already handled this correctly, but the arbitrary scale path did not.
This commit is contained in:
parent
d5f403663b
commit
6a78e7e6a8
2 changed files with 3 additions and 1 deletions
|
@ -100,6 +100,8 @@ void Canvas::draw(Gfx::Painter& painter)
|
|||
|
||||
auto buggie = Gfx::Bitmap::load_from_file("/res/graphics/buggie.png");
|
||||
painter.blit({ 25, 39 }, *buggie, { 2, 30, 62, 20 });
|
||||
painter.draw_scaled_bitmap({ 88, 39, 62 * 2, 20 * 2 }, *buggie, { 2, 30, 62, 20 });
|
||||
painter.draw_scaled_bitmap({ 202, 39, 80, 40 }, *buggie, { 2, 30, 62, 20 });
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue