mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
21 lines
547 B
C++
21 lines
547 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 {
|
|
|
|
Gfx::CornerRadius BorderRadiusData::as_corner(PaintContext const& context) const
|
|
{
|
|
return Gfx::CornerRadius {
|
|
context.floored_device_pixels(horizontal_radius).value(),
|
|
context.floored_device_pixels(vertical_radius).value()
|
|
};
|
|
}
|
|
|
|
}
|