mirror of
https://github.com/RGBCube/serenity
synced 2025-09-16 00:36:17 +00:00
LibWeb: Apply CSS scaling to SVG elements
Not sure why this was not done before, not now it works easily :^)
This commit is contained in:
parent
cf23a2b82d
commit
d0496ae9b8
5 changed files with 18 additions and 7 deletions
|
@ -67,6 +67,14 @@ DevicePixelPoint PaintContext::rounded_device_point(CSSPixelPoint point) const
|
|||
};
|
||||
}
|
||||
|
||||
DevicePixelPoint PaintContext::floored_device_point(CSSPixelPoint point) const
|
||||
{
|
||||
return {
|
||||
floorf(point.x().value() * m_device_pixels_per_css_pixel),
|
||||
floorf(point.y().value() * m_device_pixels_per_css_pixel)
|
||||
};
|
||||
}
|
||||
|
||||
DevicePixelRect PaintContext::enclosing_device_rect(CSSPixelRect rect) const
|
||||
{
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue