Skip to content
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

Improve writing of SVG files #44

Open
4 tasks
ezwelty opened this issue Feb 21, 2022 · 0 comments
Open
4 tasks

Improve writing of SVG files #44

ezwelty opened this issue Feb 21, 2022 · 0 comments

Comments

@ezwelty
Copy link
Owner

ezwelty commented Feb 21, 2022

  • Clarify that SVG child elements are drawn in order, and thus from bottom to top layer as viewed in a vector editor like Adobe Illustrator
  • Add <circle> element creator:
import xml.etree.ElementTree as ET
ET.Element('circle', cx=x, cy=y, **kwargs)
  • Stringify non-string element attributes
  • Add helper for scaling an :
SCALE = 0.25
glimpse.svg.svg(
  glimpse.svg.image(width=width, height=height, transform=f'matrix({SCALE} 0 0 {SCALE} 0 0)'),
  ET.Element('circle', cx=uv * SCALE, cy=uv * SCALE),
  width=str(width * SCALE),
  height=str(height * SCALE)
)
@ezwelty ezwelty changed the title Improve SVG module Improve writing of SVG files Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant