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
Add ability to output as PNG #140
Conversation
Wow, this is awesome! Thanks for contributing! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Only a couple small changes requested.
Also, we may possibly want to update the readme.md and contributing.md to say that composer install
is necessary for running locally since it wasn't before (the only external library was PHPUnit) and maybe brief instructions or a link on installing Imagick. It's up to you if you want to add this.
I have added a link to the official installation guide to the requirements. Do you think that it's enough for people to get started? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the link should be good enough for now. If someone has trouble installing it, hopefully they can solve it through Google or come to the repo or Discord for help.
Thanks for contributing! 🎉 |
Always happy to help! 😄 |
Description
This PR will add the ability to output the data as a PNG. In order to make this work you will need to have imagick installed and enabled.
There were a couple of changes that I had to make to the SVG as imagick had some issues regarding the
mask
attribute on the circle and thedy
attributes on the text.In order to fix the mask I added an ellipse after adding the circle. This give the same end result.
To fix the dy I had to eyeball the metrics generated from the created SVG and PNG. After that I adjusted the
y
attributes in order to align everything again.Fixes #135
Type of change
How Has This Been Tested?
composer test
Checklist:
Screenshots