mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +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
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