Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the Tkinter render quality much worse on windows?

I have developed a python app with Tkinter on a Mac. It involves forms, and canvas drawings. On the Mac, it looks great. However on my Dell laptop (4K display, and more powerful than my Mac), the Tkinter ui appears very pixelated and certain elements are located slightly differently. What is this problem known as and what can I do to render Tkinter better on Dell Windows 10 or other platforms in general? Here is a screen shot of the same part of the UI (showing form and canvas drawing)...

Windows(bad) enter image description here

Mac(normal)

enter image description here

like image 848
Caspar Wylie Avatar asked Mar 19 '17 13:03

Caspar Wylie


1 Answers

Antialiasing is only enabled for Tkinter canvas object in OSX . You can get the aggDraw lib: http://effbot.org/zone/tkinter-aggdraw.htm as a workaround, but otherwise you will get jagged lines when trying to draw on a canvas. Fonts however should be anti-aliased on all major platforms.

like image 182
BHawk Avatar answered Nov 04 '22 13:11

BHawk