ladybird/Userland/Demos
Nico Weber d551263b11 LibGfx: Make it possible to apply an (integer) scale to a Painter
This adds a scale factor to Painter, which will be used for HighDPI
support. It's also a step towards general affine transforms on Painters.

All of Painter's public API takes logical coordinates, while some
internals deal with physical coordinates now. If scale == 1, logical
and physical coordinates are the same. For scale == 2, a 200x100 bitmap
would be covered by a logical {0, 0, 100, 50} rect, while its physical
size would be {0, 0, 200, 100}.

Most of Painter's functions just assert that scale() == 1 is for now,
but most functions called by WindowServer are updated to handle
arbitrary (integer) scale.

Also add a new Demo "LibGfxScaleDemo" that covers the converted
functions and that can be used to iteratively add scaling support
to more functions.

To make Painter's interface deal with logical coordinates only,
make translation() and clip_rect() non-public.
2021-01-12 23:32:54 +01:00
..
CatDog Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
Cube Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
Eyes Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
Fire Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
LibGfxDemo Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
LibGfxScaleDemo LibGfx: Make it possible to apply an (integer) scale to a Painter 2021-01-12 23:32:54 +01:00
Mouse Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
Screensaver Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
WidgetGallery Demos: Move to Userland/Demos/ 2021-01-12 12:04:17 +01:00
CMakeLists.txt LibGfx: Make it possible to apply an (integer) scale to a Painter 2021-01-12 23:32:54 +01:00