1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

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
parent b716c14c32
commit 65d762130a
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>);
}