summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-07-17 19:45:38 +0100
committerLinus Groh <mail@linusgroh.de>2022-07-18 10:10:22 +0100
commit4246d04e5a8e4356ce6c76bbf97d56382bb411d8 (patch)
treeff6540b263e16be540a7e4c271df2c6de8a352c2 /Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
parent9e06fe4b3f935ccd9f6901927ed10ee742b84b2f (diff)
downloadserenity-4246d04e5a8e4356ce6c76bbf97d56382bb411d8.zip
LibWeb: Calculate to <corner> angles for linear-gradients
This also renames LinearGradientStyleValue::angle() to LinearGradientStyleValue::angle_degrees() to make the unit more obvious.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp b/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
index 77ab00bb31..9d4b1791c5 100644
--- a/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
+++ b/Userland/Libraries/LibWeb/Painting/BackgroundPainting.cpp
@@ -27,7 +27,7 @@ static Optional<GfxGradient> linear_gradient_to_gfx_gradient(CSS::LinearGradient
if (linear_gradient.color_stop_list().size() != 2)
return {};
- auto angle = round_to<int>(linear_gradient.angle(background_rect));
+ auto angle = round_to<int>(linear_gradient.angle_degrees(background_rect));
auto color_a = linear_gradient.color_stop_list()[0].color_stop.color;
auto color_b = linear_gradient.color_stop_list()[1].color_stop.color;
auto orientation = [&]() -> Optional<Gfx::Orientation> {