]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gdicmn.cpp
add wxGenericStaticText (#9656)
[wxWidgets.git] / src / common / gdicmn.cpp
index a79f31aa2cfd1bb9687f903f65bd23ebf9ab28cb..4129b48782485b86dddceed443659ba391bbdaf2 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/bitmap.h"
     #include "wx/colour.h"
     #include "wx/font.h"
+    #include "wx/math.h"
 #endif
 
 
@@ -880,6 +881,15 @@ wxSize wxGetDisplaySizeMM()
     return wxSize(x, y);
 }
 
+wxSize wxGetDisplayPPI()
+{
+    const wxSize pixels = wxGetDisplaySize();
+    const wxSize mm = wxGetDisplaySizeMM();
+
+    return wxSize((int)((pixels.x * inches2mm) / mm.x),
+                  (int)((pixels.y * inches2mm) / mm.y));
+}
+
 wxResourceCache::~wxResourceCache ()
 {
     wxList::compatibility_iterator node = GetFirst ();