]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/drawn.cpp
Needed to add #include "wx/statusbr.h" to know that wxStatusBar is derived
[wxWidgets.git] / contrib / src / ogl / drawn.cpp
index 0aeae7fba1a7abe47ce8427ca43b8839ed6859b4..64cf89e95f5e17ce399887764a3901c761217dc5 100644 (file)
@@ -9,11 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // 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"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 
 #include "wx/ogl/ogl.h"
 
 
 #include "wx/ogl/ogl.h"
 
+#if wxUSE_PROLOGIO
 static void IntToHex(unsigned int dec, wxChar *buf);
 static unsigned long HexToInt(wxChar *buf);
 static void IntToHex(unsigned int dec, wxChar *buf);
 static unsigned long HexToInt(wxChar *buf);
+#endif
+
 extern wxChar *oglBuffer;
 
 #define gyTYPE_PEN   40
 extern wxChar *oglBuffer;
 
 #define gyTYPE_PEN   40
@@ -1121,13 +1119,11 @@ wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *WXUNUSED(image))
     long signedY = (long)(m_points[i].y*100.0);
 
     // Scale to 0 -> 64K
     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)
 
     // 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') };
 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;
 }
 
   return n;
 }
 
+#endif // wxUSE_PROLOGIO
+
 /*
  * wxPseudo meta-file
  *
 /*
  * wxPseudo meta-file
  *
@@ -1613,9 +1613,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
         {
           int penWidth = (int)expr->Nth(1)->IntegerValue();
           int penStyle = (int)expr->Nth(2)->IntegerValue();
         {
           int penWidth = (int)expr->Nth(1)->IntegerValue();
           int penStyle = (int)expr->Nth(2)->IntegerValue();
-          int penRed = (int)expr->Nth(3)->IntegerValue();
-          int penGreen = (int)expr->Nth(4)->IntegerValue();
-          int penBlue = (int)expr->Nth(5)->IntegerValue();
+          unsigned char penRed = (unsigned char)expr->Nth(3)->IntegerValue();
+          unsigned char penGreen = (unsigned char)expr->Nth(4)->IntegerValue();
+          unsigned char penBlue = (unsigned char)expr->Nth(5)->IntegerValue();
           wxColour col(penRed, penGreen, penBlue);
           wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle);
           if (!p)
           wxColour col(penRed, penGreen, penBlue);
           wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle);
           if (!p)
@@ -1626,9 +1626,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
         case gyTYPE_BRUSH:
         {
           int brushStyle = (int)expr->Nth(1)->IntegerValue();
         case gyTYPE_BRUSH:
         {
           int brushStyle = (int)expr->Nth(1)->IntegerValue();
-          int brushRed = (int)expr->Nth(2)->IntegerValue();
-          int brushGreen = (int)expr->Nth(3)->IntegerValue();
-          int brushBlue = (int)expr->Nth(4)->IntegerValue();
+          unsigned char brushRed = (unsigned char)expr->Nth(2)->IntegerValue();
+          unsigned char brushGreen = (unsigned char)expr->Nth(3)->IntegerValue();
+          unsigned char brushBlue = (unsigned char)expr->Nth(4)->IntegerValue();
           wxColour col(brushRed, brushGreen, brushBlue);
           wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle);
           if (!b)
           wxColour col(brushRed, brushGreen, brushBlue);
           wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle);
           if (!b)
@@ -2187,6 +2187,7 @@ void wxPseudoMetaFile::GetBounds(double *boundMinX, double *boundMinY, double *b
       case DRAWOP_DRAW_RECT:
       case DRAWOP_DRAW_ROUNDED_RECT:
       case DRAWOP_DRAW_ELLIPSE:
       case DRAWOP_DRAW_RECT:
       case DRAWOP_DRAW_ROUNDED_RECT:
       case DRAWOP_DRAW_ELLIPSE:
+      case DRAWOP_DRAW_ELLIPTIC_ARC:
       case DRAWOP_DRAW_POINT:
       case DRAWOP_DRAW_TEXT:
       {
       case DRAWOP_DRAW_POINT:
       case DRAWOP_DRAW_TEXT:
       {
@@ -2204,7 +2205,8 @@ void wxPseudoMetaFile::GetBounds(double *boundMinX, double *boundMinY, double *b
         }
         else if (op->GetOp() == DRAWOP_DRAW_RECT ||
                  op->GetOp() == DRAWOP_DRAW_ROUNDED_RECT ||
         }
         else if (op->GetOp() == DRAWOP_DRAW_RECT ||
                  op->GetOp() == DRAWOP_DRAW_ROUNDED_RECT ||
-                 op->GetOp() == DRAWOP_DRAW_ELLIPSE)
+                 op->GetOp() == DRAWOP_DRAW_ELLIPSE ||
+                 op->GetOp() == DRAWOP_DRAW_ELLIPTIC_ARC)
         {
           if ((opDraw->m_x1 + opDraw->m_x2) < minX) minX = (opDraw->m_x1 + opDraw->m_x2);
           if ((opDraw->m_x1 + opDraw->m_x2) > maxX) maxX = (opDraw->m_x1 + opDraw->m_x2);
         {
           if ((opDraw->m_x1 + opDraw->m_x2) < minX) minX = (opDraw->m_x1 + opDraw->m_x2);
           if ((opDraw->m_x1 + opDraw->m_x2) > maxX) maxX = (opDraw->m_x1 + opDraw->m_x2);