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

Allow fine-tuning of SVG output by forwarding keyword arguments #250

Merged
merged 3 commits into from
Jan 21, 2022

Conversation

agnat
Copy link
Contributor

@agnat agnat commented Jan 9, 2022

Forwarding the kwargs in SvgFragmentImage.new_image() allows additional fine-tuning of the resulting SVG node. Similarly, adding kwargs to the to_string() method helps to adjust things like the string encoding:

qr = qrcode.QRCode(image_factory=qrcode.image.svg.SvgPathImage)
svg_str = qr.make_image(attrib={'class': 'some-css-class'}).to_string(encoding='unicode')

Both features are mentioned in the README. Let me know what you think...

Pass on the keyword arguments in to_string() and new_image().
@maribedran maribedran merged commit d76425d into lincolnloop:master Jan 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

Successfully merging this pull request may close these issues.

None yet

2 participants