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

Do not round rotation in SVG #1131

Merged
merged 1 commit into from Mar 5, 2022
Merged

Conversation

tammojan
Copy link
Contributor

When making >8 generation fan charts, the rounding of rotation becomes visible. SVG does not force rotation to be integers, so better not round this.

@@ -128,7 +128,7 @@ def rotate_text(self, style, text, x, y, angle, mark=None):
self.buffer.write(
'<text ' +
'x="%4.2f" y="%4.2f" ' % (xpos, ypos) +
'transform="rotate(%d %4.2f %4.2f)" ' % (angle, centerx, centery) +
'transform="rotate(%4.2 %4.2f %4.2f)" ' % (angle, centerx, centery) +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean:

Suggested change
'transform="rotate(%4.2 %4.2f %4.2f)" ' % (angle, centerx, centery) +
'transform="rotate(%4.2f %4.2f %4.2f)" ' % (angle, centerx, centery) +

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I did, thanks for checking! I amended the commit with the extra f.

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2020

Codecov Report

Merging #1131 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1131   +/-   ##
=======================================
  Coverage   41.28%   41.28%           
=======================================
  Files        1060     1060           
  Lines      143397   143397           
=======================================
  Hits        59204    59204           
  Misses      84193    84193           
Impacted Files Coverage Δ
gramps/plugins/docgen/svgdrawdoc.py 93.65% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c567b9e...f80a425. Read the comment docs.

When making >8 generation fan charts, the rounding of rotation becomes visible. SVG does not force rotation to be integers, so better not round this.
@Nick-Hall Nick-Hall merged commit 2b033df into gramps-project:master Mar 5, 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
4 participants