Kozea / Kozea/CairoSVG

how to access to the paths drawn by cairo svg

Open
#268 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
951
Forks
166
PR merge metrics
No merged PRs in 30d

Description

using svg2svg from cairosvg, the SVG file created by cairoSVG contains several paths which are drawn in the surface. How is it possible to access to these paths? Operations needed are of the type:
see how many paths are in the surface, get information on one of the paths, (closed? list of segments) fill an individual path and check if some point is in the fill?
All this information can be obtained by redrawing the generated svg file but is there a more efficient way to do this?
I have not found how the recording surface could be of any help for this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the svg2svg conversion path and the Cairo recording-surface behavior mentioned in the issue. Determine whether drawn paths can be enumerated and inspected without redrawing the generated SVG, then document the supported approach or the API gap. Done means the path count, segment information, fill operations, and point-in-fill checks are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.