1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibWeb: Add and use convinient from_raw helper in PixelUnits

This commit is contained in:
Hendiadyoin1 2023-07-26 14:58:51 +02:00 committed by Alexander Kalenik
parent 127b966219
commit 618f889486
2 changed files with 10 additions and 9 deletions

View file

@ -59,6 +59,13 @@ public:
CSSPixels(float value);
CSSPixels(double value);
static CSSPixels from_raw(int value)
{
CSSPixels res;
res.set_raw_value(value);
return res;
}
float to_float() const;
double to_double() const;
int to_int() const;