slashme / parliamentdiagram

Parliament diagram creator
GNU General Public License v2.0
99 stars 27 forks source link

Fix position of the number of seats #128

Closed Gouvernathor closed 2 months ago

Gouvernathor commented 2 years ago

The canvas is supposed to be 350 by 175 pixels, with 5 pixels blank border on all four sides, which makes 360 by 185 total. https://github.com/slashme/parliamentdiagram/blob/0a37d29b8c9724860a1b981af853f3c7222f87e4/newarch.py#L369-L370 The center of the bottom of the text need to find itself at the bottom center of the margin-less canvas. That means at position 175 (350/2) by 175. That was the position given to the text in the code : 175 by 175. BUT if you take the margins into account (the top one and the left one to be specific), that must become the position 180 by 180.

The text was visibly offset to the left (and has been for a long time !), with 180 it doesn't appear to be. The vertical position is a bit less important, 180 makes it good math-wise so 🤷 but I could hear the argument that 175 vertically looks better.