]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/PlatWX.cpp
minor additions to wxCmdLineParser tests
[wxWidgets.git] / src / stc / PlatWX.cpp
index 862d16456d3fe6e6c3e71267cf1326033f267aa3..ae53b19b54a3822976b6945faaaf13c0cedb25cf 100644 (file)
@@ -174,6 +174,8 @@ void Surface::InitPixMap(int width, int height, Surface *surface_) {
     Release();
     hdc = new wxMemoryDC(surface_->hdc);
     hdcOwned = true;
+    if (width < 1) width = 1;
+    if (height < 1) height = 1;
     bitmap = new wxBitmap(width, height);
     ((wxMemoryDC*)hdc)->SelectObject(*bitmap);
 }
@@ -198,7 +200,7 @@ int Surface::LogPixelsY() {
 
 
 int Surface::DeviceHeightFont(int points) {
-    return points * LogPixelsY() / 72;
+    return points;
 }