tags:

views:

136

answers:

2

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.

+2  A: 

does this help? (from the manual)

wxDC::GetPPI
wxSize GetPPI() const

Returns the resolution of the device in pixels per inch.
Toni Ruža
+2  A: 

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

Jonas Gulle