mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibWeb: Resolve and paint SVG gradient fills
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1) into document().get_element_by_id('grad1') then resolves the gradient. This seems to do the trick for most use cases, but this is not attempting to follow the spec yet to keep things simple.
This commit is contained in:
parent
aa3464466e
commit
afd355c135
6 changed files with 97 additions and 17 deletions
|
@ -29,6 +29,7 @@ public:
|
|||
void set_stroke_width(float width) { state().stroke_width = width; }
|
||||
|
||||
CSSPixelPoint svg_element_position() const { return m_svg_element_bounds.top_left(); }
|
||||
CSSPixelSize svg_element_size() const { return m_svg_element_bounds.size(); }
|
||||
|
||||
void save() { m_states.append(m_states.last()); }
|
||||
void restore() { m_states.take_last(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue