LibWeb: Calculate to <corner> angles for linear-gradients

This also renames LinearGradientStyleValue::angle() to
LinearGradientStyleValue::angle_degrees() to make the unit more
obvious.
This commit is contained in:
MacDue 2022-07-17 19:45:38 +01:00 committed by Linus Groh
commit 4246d04e5a
Notes: sideshowbarker 2024-07-17 08:50:23 +09:00
3 changed files with 15 additions and 6 deletions

View file

@ -936,7 +936,7 @@ public:
return m_color_stop_list;
}
float angle(Gfx::FloatRect const& background_box) const;
float angle_degrees(Gfx::FloatRect const& gradient_rect) const;
private:
LinearGradientStyleValue(GradientDirection direction, Vector<ColorStopListElement> color_stop_list)