mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
In the upcoming change, device pixel conversion of ClipFrame will happen during display list replay, where PaintContext is not available, so let’s move it out of PaintContext.
21 lines
578 B
C++
21 lines
578 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
|
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Painting/BorderRadiiData.h>
|
|
#include <LibWeb/Painting/PaintContext.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
CornerRadius BorderRadiusData::as_corner(DevicePixelConverter const& device_pixel_scale) const
|
|
{
|
|
return CornerRadius {
|
|
device_pixel_scale.floored_device_pixels(horizontal_radius).value(),
|
|
device_pixel_scale.floored_device_pixels(vertical_radius).value()
|
|
};
|
|
}
|
|
|
|
}
|