]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/drawn.cpp
remove unneeded WXDLLEXPORTs for the classes only used inside the implementation...
[wxWidgets.git] / contrib / src / ogl / drawn.cpp
index 72130a6759c685f410c853775a4b9d3425bf8079..5fac9c84adfb7f249201e919e8f55300c252ddc1 100644 (file)
@@ -9,11 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "drawn.h"
-#pragma implementation "drawnp.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #endif
 
 #ifndef WX_PRECOMP
-#include <wx/wx.h>
+#include "wx/wx.h"
 #endif
 
 #if wxUSE_PROLOGIO
-#include <wx/deprecated/wxexpr.h>
+#include "wx/deprecated/wxexpr.h"
 #endif
 
 #include "wx/ogl/ogl.h"
 
+#if wxUSE_PROLOGIO
 static void IntToHex(unsigned int dec, wxChar *buf);
 static unsigned long HexToInt(wxChar *buf);
+#endif
+
 extern wxChar *oglBuffer;
 
 #define gyTYPE_PEN   40
@@ -363,12 +361,12 @@ void wxDrawnShape::DestroyClippingRect()
     m_metafiles[m_currentAngle].DestroyClippingRect();
 }
 
-void wxDrawnShape::SetDrawnPen(wxPen* pen, bool isOutline)
+void wxDrawnShape::SetDrawnPen(const wxPen* pen, bool isOutline)
 {
     m_metafiles[m_currentAngle].SetPen(pen, isOutline);
 }
 
-void wxDrawnShape::SetDrawnBrush(wxBrush* brush, bool isFill)
+void wxDrawnShape::SetDrawnBrush(const wxBrush* brush, bool isFill)
 {
     m_metafiles[m_currentAngle].SetBrush(brush, isFill);
 }
@@ -1121,13 +1119,11 @@ wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *WXUNUSED(image))
     long signedY = (long)(m_points[i].y*100.0);
 
     // Scale to 0 -> 64K
-    long unSignedX = (long)(signedX + 32767.0);
-    long unSignedY = (long)(signedY + 32767.0);
+    unsigned int unSignedX = (unsigned int)(signedX + 32767.0);
+    unsigned int unSignedY = (unsigned int)(signedY + 32767.0);
 
-//    IntToHex((unsigned int)signedX, buf2);
-//    IntToHex((unsigned int)signedY, buf3);
-    IntToHex((int)unSignedX, buf2);
-    IntToHex((int)unSignedY, buf3);
+    IntToHex(unSignedX, buf2);
+    IntToHex(unSignedY, buf3);
 
     // Don't overrun the buffer
     if ((i*8) < 3000)
@@ -1273,6 +1269,8 @@ bool wxOpPolyDraw::GetPerimeterPoint(double x1, double y1,
  *
  */
 
+#if wxUSE_PROLOGIO
+
 static char hexArray[] = {
     _T('0'), _T('1'), _T('2'), _T('3'), _T('4'), _T('5'), _T('6'), _T('7'),
     _T('8'), _T('9'), _T('A'), _T('B'), _T('C'), _T('D'), _T('E'), _T('F') };
@@ -1345,6 +1343,8 @@ static unsigned long HexToInt(wxChar *buf)
   return n;
 }
 
+#endif // wxUSE_PROLOGIO
+
 /*
  * wxPseudo meta-file
  *
@@ -2417,9 +2417,9 @@ void wxPseudoMetaFile::DestroyClippingRect()
     m_ops.Append(theOp);
 }
 
-void wxPseudoMetaFile::SetPen(wxPen* pen, bool isOutline)
+void wxPseudoMetaFile::SetPen(const wxPen* pen, bool isOutline)
 {
-    m_gdiObjects.Append(pen);
+    m_gdiObjects.Append(wx_const_cast(wxPen*, pen));
     int n = m_gdiObjects.GetCount();
 
     wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_PEN, this, n - 1);
@@ -2432,9 +2432,9 @@ void wxPseudoMetaFile::SetPen(wxPen* pen, bool isOutline)
     }
 }
 
-void wxPseudoMetaFile::SetBrush(wxBrush* brush, bool isFill)
+void wxPseudoMetaFile::SetBrush(const wxBrush* brush, bool isFill)
 {
-    m_gdiObjects.Append(brush);
+    m_gdiObjects.Append(wx_const_cast(wxBrush*, brush));
     int n = m_gdiObjects.GetCount();
 
     wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_BRUSH, this, n - 1);