summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/Directory.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-11-08 17:37:49 +0000
committerSam Atkins <atkinssj@gmail.com>2022-12-08 12:46:03 +0000
commitbd272e638cc33e3282ffde1052eafd15cd00eac5 (patch)
tree443cf21c5f6338e6798edf07cffe17a3494fdda1 /Userland/Libraries/LibCore/Directory.h
parent83f31cb4a7d5724e59a4baf05bd46d092dc15be9 (diff)
downloadserenity-bd272e638cc33e3282ffde1052eafd15cd00eac5.zip
LibWeb: Introduce CSSPixels and DevicePixels classes
These are an attempt to separate the internal "pixel" used by CSS from the actual "pixel" that exists on the display. Because of things like 2x display scaling, the ratio between these can vary, so having distinct types will help prevent errors when converting from one unit to the other. `CSSPixels` refers to the `px` unit used on the web, which depending on the device may or may not map to 1 pixel on the physical display. It's a wrapper around `float`, and will be used by LibWeb for size and position values up until we go to paint them to the screen. `DevicePixels` on the other hand is a 1-to-1 pixel on the physical display. It's a wrapper around `int`.
Diffstat (limited to 'Userland/Libraries/LibCore/Directory.h')
0 files changed, 0 insertions, 0 deletions