-
Notifications
You must be signed in to change notification settings - Fork 44
Fixed yuiseki's svg renderer #36
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
base: master
Are you sure you want to change the base?
Fixed yuiseki's svg renderer #36
Conversation
- added support for the promoted pieces - shifted some values for the pieces in hand - altered shadow drop
- check pieces for initial board position - check pieces for complex board position
|
@DerAndereJohannes |
| .. code:: python | ||
| >>> print(board.svg()) | ||
| <svg> |
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.
It would be great if we could embed a real image generated by the command board.svg().
But I know it's not easy.
gunyarakun
left a comment
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.
LGTM!
|
@yuiseki I've heard the license of the koma SVGs are |
|
@gunyarakun I've copied those koma SVGs from this repository and merged it at SVG.py as definition of SGV. It seems originally work is series of contribute for wikipedia. I've already contain those license information to SVG.py CC BY-SA 4.0 is compatible with GPLv3, but those SVG is licensed under CC BY-SA 3.0, So license matter isn't be simple... |
|
I'm thinking one of solution to this license problem: Separate shogi.svg file as independent file and license only it as CC BY-SA 3.0 then read it from SVG.py |
- quantity would be overwritten with the second digit of the number ie. if sente has 12 pawns, the svg would say he has 2 pawns - to fix, changed the quantity to a string and converted to int before using the value
- added file saving example for both python 2.7 and 3
|
I added the svg image and some more test code into the README! (the :align: center did not really work though..) I found another bug too when a player has more than 9 of a piece in their hand and fixed it! Should we proceed with the yuiseki's idea of keeping the svg file separate with the other lisence? Is this legally possible? If it is then I think it is also the correct solution |
|
I forgot to write my thought. |
Overview
Potential Improvements
Example
Any comments welcome!