]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/src/composit.cpp
fixed somebody's poorly done StreamSize-->GetSize transition
[wxWidgets.git] / utils / ogl / src / composit.cpp
index 8d1e60add6a44cecde9c0be1decb668d25eda8dc..c5118f64e778c92dc435f4c933ff221ca95a30b3 100644 (file)
@@ -24,9 +24,7 @@
 #include <wx/wx.h>
 #endif
 
-#ifdef PROLOGIO
 #include <wx/wxexpr.h>
-#endif
 
 #include "basic.h"
 #include "basicp.h"
@@ -103,8 +101,8 @@ void wxCompositeShape::OnDraw(wxDC& dc)
   if (m_shadowMode != SHADOW_NONE)
   {
     if (m_shadowBrush)
-      dc.SetBrush(m_shadowBrush);
-    dc.SetPen(g_oglTransparentPen);
+      dc.SetBrush(m_shadowBrush);
+    dc.SetPen(g_oglTransparentPen);
 
     if (m_cornerRadius != 0.0)
       dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
@@ -843,7 +841,7 @@ wxDivisionShape::~wxDivisionShape()
 
 void wxDivisionShape::OnDraw(wxDC& dc)
 {
-    dc.SetBrush(wxTRANSPARENT_BRUSH);
+    dc.SetBrush(wxTRANSPARENT_BRUSH);
     dc.SetBackgroundMode(wxTRANSPARENT);
 
     double x1 = (double)(GetX() - (GetWidth()/2.0));
@@ -858,18 +856,18 @@ void wxDivisionShape::OnDraw(wxDC& dc)
 
     if (m_leftSide)
     {
-      dc.SetPen(m_leftSidePen);
+      dc.SetPen(m_leftSidePen);
       dc.DrawLine(WXROUND(x1), WXROUND(y2), WXROUND(x1), WXROUND(y1));
     }
     if (m_topSide)
     {
-      dc.SetPen(m_topSidePen);
+      dc.SetPen(m_topSidePen);
       dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y1));
     }
 
     // For testing purposes, draw a rectangle so we know
     // how big the division is.
-//    SetBrush(wxCYAN_BRUSH);
+//    SetBrush(wxCYAN_BRUSH);
 //    wxRectangleShape::OnDraw(dc);
 }
 
@@ -1716,7 +1714,7 @@ void wxDivisionShape::EditEdge(int side)
 // Popup menu
 void wxDivisionShape::PopupMenu(double x, double y)
 {
-  oglPopupDivisionMenu->SetClientData((char *)this);
+  oglPopupDivisionMenu->SetClientData((void *)this);
   if (m_leftSide)
     oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_LEFT_EDGE, TRUE);
   else
@@ -1735,8 +1733,8 @@ void wxDivisionShape::PopupMenu(double x, double y)
   wxClientDC dc(GetCanvas());
   GetCanvas()->PrepareDC(dc);
 
-  int mouse_x = (int)(dc.LogicalToDeviceX(x - x1*unit_x));
-  int mouse_y = (int)(dc.LogicalToDeviceY(y - y1*unit_y));
+  int mouse_x = (int)(dc.LogicalToDeviceX((long)(x - x1*unit_x)));
+  int mouse_y = (int)(dc.LogicalToDeviceY((long)(y - y1*unit_y)));
 
   m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
 }