mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibWeb: Create LayoutNodes for each SVG element
This brings the SVG API closer to the rest of LibWeb
This commit is contained in:
parent
f2055bb509
commit
455ce0b9c3
16 changed files with 402 additions and 122 deletions
|
@ -32,7 +32,7 @@ class SVGContext {
|
|||
public:
|
||||
SVGContext()
|
||||
{
|
||||
push_state();
|
||||
m_states.append(State());
|
||||
}
|
||||
|
||||
const Gfx::Color& fill_color() const { return state().fill_color; }
|
||||
|
@ -43,9 +43,8 @@ public:
|
|||
void set_stroke_color(Gfx::Color color) { state().stroke_color = color; }
|
||||
void set_stroke_width(float width) { state().stroke_width = width; }
|
||||
|
||||
void push_state() { m_states.append(State()); }
|
||||
|
||||
void pop_state() { m_states.take_last(); }
|
||||
void save() { m_states.append(m_states.last()); }
|
||||
void restore() { m_states.take_last(); }
|
||||
|
||||
private:
|
||||
struct State {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue