Tkinter, canvas, create_text and zooming

*爱你&永不变心* 提交于 2021-02-11 13:19:13

问题


Is it normal that Tkinter's Canvas' create_text 's font size doesn't change when I change the Canvas' scale with canvas.scale ?

I thought that, as it is a high level GUI management system, I wouldn't have to resize manually the text done with create_text after a zooming. Isn't this strange, or am I wrong ?


回答1:


It's normal, even if not entirely what you want. The scale method just changes the coordinate lists, but text items only have one of those so they just get (optionally) translated.

This also applies to image and bitmap items. And features of other items like the line width; they're not scaled.



来源:https://stackoverflow.com/questions/20689760/tkinter-canvas-create-text-and-zooming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!