Question

In wxWidgets, how can you find the pixels per inch on a wxDC? I'd like to be able to scale things by a real world number like inches. That often makes it easier to use the same code for printing to the screen and the printer.

Was it helpful?

Solution

does this help? (from the manual)

wxDC::GetPPI
wxSize GetPPI() const

Returns the resolution of the device in pixels per inch.

OTHER TIPS

...or wxDC::GetSizeMM which return the horizontal and vertical resolution in millimetres.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top