mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 02:56:10 +00:00
LibWeb: Move some common SVG gradient functions into SVGGradientElement
These functions will also be used by SVG radial gradients.
This commit is contained in:
parent
eda429111e
commit
2826bd2b45
Notes:
sideshowbarker
2024-07-17 01:12:07 +09:00
Author: https://github.com/MacDue
Commit: 2826bd2b45
Pull-request: https://github.com/SerenityOS/serenity/pull/18617
Reviewed-by: https://github.com/gmta
3 changed files with 38 additions and 19 deletions
|
@ -41,6 +41,8 @@ protected:
|
|||
|
||||
JS::GCPtr<SVGGradientElement const> xlink_href() const;
|
||||
|
||||
Gfx::AffineTransform gradient_paint_transform(SVGPaintContext const&) const;
|
||||
|
||||
template<VoidFunction<SVGStopElement> Callback>
|
||||
void for_each_color_stop(Callback const& callback) const
|
||||
{
|
||||
|
@ -55,6 +57,8 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
void add_color_stops(Gfx::SVGGradientPaintStyle&) const;
|
||||
|
||||
private:
|
||||
Optional<GradientUnits> m_gradient_units = {};
|
||||
Optional<Gfx::AffineTransform> m_gradient_transform = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue