LibWeb: Factor out SVG path parsing from SVGPathElement

Converting a Vector<PathInstruction> is now done by a free function so
that we can share this code with HTML::Path2D. :^)
This commit is contained in:
Andreas Kling 2022-11-29 14:06:41 +01:00
commit 65d762130a
Notes: sideshowbarker 2024-07-17 05:58:46 +09:00
2 changed files with 27 additions and 21 deletions

View file

@ -27,8 +27,9 @@ private:
SVGPathElement(DOM::Document&, DOM::QualifiedName);
Vector<PathInstruction> m_instructions;
Gfx::FloatPoint m_previous_control_point = {};
Optional<Gfx::Path> m_path;
};
Gfx::Path path_from_path_instructions(Span<PathInstruction const>);
}