mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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
|
@ -109,12 +109,16 @@ public:
|
|||
SVGPathElement(DOM::Document&, const FlyString& tag_name);
|
||||
virtual ~SVGPathElement() override = default;
|
||||
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
|
||||
|
||||
virtual void parse_attribute(const FlyString& name, const String& value) override;
|
||||
virtual void paint(Gfx::Painter& painter, const SVGPaintingContext& context) override;
|
||||
|
||||
Gfx::Path& get_path();
|
||||
|
||||
private:
|
||||
Vector<PathInstruction> m_instructions;
|
||||
Gfx::FloatPoint m_previous_control_point = {};
|
||||
Optional<Gfx::Path> m_path;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue