-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal XML representation of Penpot shapes #69
Comments
We definitely need to retain
|
There are penpot shapes for which the SVG representation must be retained:
This gives rise to a simplified conversion rule: Examples: <g>
<penpot:shape type="bool">...</penpot:shape>
<defs/>
<g>...</g> <!-- can be removed -->
<penpot:bool>...</penpot:bool>
</g>
<g>
<penpot:shape type="circle">...</penpot:shape>
<defs/>
<g>...</g> <!-- must be retained -->
</g> Problem: redundant representation While the conversion rule is simple enough, it's highly unfortunate from a representational point of view, because it makes the representation quite redundant. <g id="shape-459cc494-9782-8033-8004-753e7ef8b63c">
<penpot:shape penpot:name="Circle-6" penpot:type="circle" penpot:transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)" penpot:transform-inverse="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)" penpot:proportion="1" penpot:proportion-lock="false" penpot:rotation="0" penpot:center-x="1172" penpot:center-y="510" penpot:constraints-h="scale" penpot:constraints-v="scale" viewBox="0.0 0.0 0.0 0.0">
<penpot:svg-import/>
<penpot:fills>
<penpot:fill penpot:fill-color="#b1b2b5" penpot:fill-opacity="1"/>
</penpot:fills>
</penpot:shape>
<defs/>
<g class="fills" id="fills-459cc494-9782-8033-8004-753e7ef8b63c">
<ellipse cx="1172" cy="510" rx="36" ry="36" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)" style="fill:#b1b2b5;fill-opacity:1"/>
</g>
</g> In this example, the |
From the Penpot SVG export, determine the minimal XML representation, removing the actual SVG content which is not used by Penpot when importing the format.
This representation could serve as the basis for variation generation (#68).
The text was updated successfully, but these errors were encountered: