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:
parent
127b966219
commit
618f889486
2 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue