1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:37:34 +00:00
serenity/Userland/Demos/LibGfxScaleDemo
Nico Weber 2ec6bbd7a1 LibGfx: Add a draw_scaled_bitmap() variant that takes a FloatRect as src_rect
Consider

    draw_scaled_bitmap({0, 0, 10, 10}, source, {0, 0, 5, 5}).

Imagine wanting to split that up into two calls, like e.g. the
compositor when redrawing the background with damage rects. You really
want to be able to say

    draw_scaled_bitmap({0, 0, 5, 10}, source, {0, 0, 2.5, 5})

but up to now you couldn't. Now you can.

This makes painting very low-res images (such as tile.png) in mode
"stretch" work much better.
2021-01-22 22:13:53 +01:00
..
CMakeLists.txt LibGfx: Make it possible to apply an (integer) scale to a Painter 2021-01-12 23:32:54 +01:00
main.cpp LibGfx: Add a draw_scaled_bitmap() variant that takes a FloatRect as src_rect 2021-01-22 22:13:53 +01:00