1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:38:10 +00:00
serenity/Userland/Libraries
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
..
LibAudio Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibC Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibChess Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCompress Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCore LibCore: Don't create an RPC server when built for lagom 2021-01-12 16:21:34 +01:00
LibCoreDump Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCrypt Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibCrypto Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibDebug Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibDesktop Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibDiff Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibELF Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibGemini Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibGfx LibGfx: Make it possible to apply an (integer) scale to a Painter 2021-01-12 23:32:54 +01:00
LibGUI Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibHTTP Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibImageDecoderClient Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibIPC Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibJS Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibKeyboard Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibLine Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibM Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibMarkdown Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibPCIDB Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibProtocol Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibPthread LibPthread: Add pthread_equal() 2021-01-12 13:42:45 +01:00
LibRegex Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTar Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTextCodec Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibThread Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTLS Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibTTF Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibVT Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibWeb Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
LibX86 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
CMakeLists.txt Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00