Hi, I've been wondering why the zooming is implemented on the Pd core? Tk's 
canvas has a scale method and people have been using to implement a zoom 
feature, e.g. https://www.tek-tips.com/viewthread.cfm?qid=239833

Ideally, the core shouldn't have to know about the size of the GUI window at 
all and just work with "logical" coordinates. The GUI can scale the content to 
whatever size it wants and when communicating with the core it would transform 
the mouse coordinates between logical and screen coordinates. Some better GUI 
frameworks already do that for you (e.g. Qt's QGraphicsScene/QGraphicView), but 
it shouldn't be too hard to do it manually for Tk. This would also allow 
fractional zoom factors. Unfortunately, Tk doesn't allow fractional font sizes 
(or has this changed?), but we could have at least *some* steps between 100% 
and 200%. Also, it would make the Pd core code much easier because we wouldn't 
have to worry about zoom at all...

This is just I've been wondering about when having a look at the zooming code 
and coming from my experience of developing GUI apps with Qt. Maybe I'm missing 
something obvious?

Christof




_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to