I am working on an alternative music notation app for a long time and I have a problem. I use Tkinter canvas for drawing the whole score. I get different results on:
Thank you!
paperheigth = root.winfo_fpixels('1m') * 297 * (scale_S) # a4 210x297 mm paperwidth = root.winfo_fpixels('1m') * 210 * (scale_S)I use this to get the size of the paper. The problem is that the outcoming number is different on every platform so the score looks different too. How can I create a standard a4 format that is the same on windows, mac and linux? I tried to use the same numbers but the problem stays the same. I hope someone knows a solution... to make it concrete:
from tkinter import Tk, Canvas root = Tk() canvas = Canvas(root) canvas.place(relwidth=1, relheight=1) paperheigth = root.winfo_fpixels('1m') * 297 paperwidth = root.winfo_fpixels('1m') * 210 canvas.create_rectangle(20, 20, 20+paperwidth, 20+paperheigth, outline='', fill='white') canvas.create_line(100, 40, 100, 700, width=2) root.mainloop()I want the paper and the line look exactly the same on all different platforms. How to do this?
Thank you!