]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/samples/ogledit/view.cpp
Corrected grey scrolling windows; added C++Builder 3.0 fixes
[wxWidgets.git] / utils / ogl / samples / ogledit / view.cpp
index 9ce5b7c332d4c9d9986814ad6174c9a8c6cf82e2..0d8e58232b9c552d26da423005c13ce388c2d440 100644 (file)
@@ -77,7 +77,7 @@ void DiagramView::OnDraw(wxDC *dc)
   /* You might use THIS code if you were scaling 
    * graphics of known size to fit on the page. 
    */ 
-  float w, h; 
+  int w, h; 
 
   // We need to adjust for the graphic size, a formula will be added 
   float maxX = 900; 
@@ -119,7 +119,7 @@ void DiagramView::OnDraw(wxDC *dc)
 
   // Set the scale and origin 
   dc->SetUserScale (actualScale, actualScale); 
-  dc->SetDeviceOrigin (posX, posY); 
+  dc->SetDeviceOrigin ((long) posX, (long) posY); 
 
   // This part was added to preform the print preview and printing functions 
 
@@ -253,6 +253,7 @@ MyCanvas::MyCanvas(wxView *v, wxWindow *parent, wxWindowID id, const wxPoint& po
     const wxSize& size, long style):
  wxShapeCanvas(parent, id, pos, size, style)
 {
+  SetBackgroundColour(*wxWHITE);
   view = v;
 }