Documentation
¶
Overview ¶
Package svgpath parses and validates SVG path `d` attribute data — the grammar shared by <path>, <clipPath>, and CSS clip-path: path(). It has no knowledge of PSRT; callers compose it with their own policies (e.g. PSRT's ~~ block requiring a single shape — see psrt.flushPathMaskBlock).
This is a purpose-built parser rather than a third-party SVG library: available Go libraries either bundle unrelated rasterization machinery (oksvg embeds rasterx, which pulls in fill/stroke/scan code no caller here needs) or have unproven handling of the compact elliptical-arc flag notation (e.g. "A5,5,45,0030,30", where the flags are single digits glued to the following number) — handled explicitly here via readFlag.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitCommands ¶
SplitCommands breaks SVG path `d` data into one string per command — useful for writers that want one command per line for readable diffs (e.g. PSRT's ~~ block serializer). It does not validate d; callers that need validity should call Parse/Validate first.