aardappel / treesheets

TreeSheets : Free Form Data Organizer (see strlen.com/treesheets)
zlib License
2.64k stars 194 forks source link

Make units on the canvas device-independent #747

Closed tobiolo closed 1 week ago

tobiolo commented 3 weeks ago

When the coordinates are used for drawing, they are translated to device-dependent units with wxWindow::FromDIP.

aardappel commented 3 weeks ago

What does the before and after look like, visually?

The FromDIP everywhere is not great, code wise.

I'd worry this has unintended side effects.. there's a lot more places where sizes are being worked with in very specific ways, including font sizes, rounding sizes etc.

tobiolo commented 2 weeks ago

Well I derived this from the wxWidgets sample files, see e.g. https://github.com/wxWidgets/wxWidgets/blob/master/samples/drawing/drawing.cpp My hopes are that this may fix printing on the PrintDC. But I still have to validate this. So this PR can be left open.