1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

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
parent 9e06fe4b3f
commit 4246d04e5a
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)