]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/_oglshapes.i
Changed type of bitmaps. RC of DMC reported 'is not a valid Windows 3.0 or OS/2 1...
[wxWidgets.git] / wxPython / contrib / ogl / _oglshapes.i
index db2111178ff9f96847bbc0395226d65a295dfcdd..fb9bc951360ca2fdc6d1a1ea8cd4fa36f629e551 100644 (file)
@@ -22,6 +22,15 @@ enum {
 };
 
 //---------------------------------------------------------------------------
+
+%typemap(in) (int points, wxPoint* points_array ) {
+    $2 = wxPoint_LIST_helper($input, &$1);
+    if ($2 == NULL) SWIG_fail;
+}
+%typemap(freearg) (int points, wxPoint* points_array ) {
+    if ($2) delete [] $2;
+}
+
 //---------------------------------------------------------------------------
 
 class wxPseudoMetaFile : public wxObject {
@@ -69,9 +78,9 @@ public:
     void DrawEllipse(const wxRect& rect);
     void DrawPoint(const wxPoint& pt);
     void DrawText(const wxString& text, const wxPoint& pt);
-    void DrawLines(int PCOUNT, wxPoint* points);
-    void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
-    void DrawSpline(int PCOUNT, wxPoint* points);
+    void DrawLines(int points, wxPoint* points_array);
+    void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
+    void DrawSpline(int points, wxPoint* points_array);
     void SetClippingRect(const wxRect& rect);
     void DestroyClippingRect();
     void SetPen(wxPen* pen, bool isOutline = FALSE);
@@ -124,13 +133,14 @@ public:
 
 class wxPyRectangleShape : public wxPyShape {
 public:
-    %addtofunc wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
+    %pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)"
     
     wxPyRectangleShape(double width = 0.0, double height = 0.0);
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
     void SetCornerRadius(double radius);
-
+    double GetCornerRadius();
+    
     void base_OnDelete();
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
@@ -171,7 +181,7 @@ public:
 
 class wxPyControlPoint : public wxPyRectangleShape {
 public:
-    %addtofunc wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
+    %pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)"
     
     wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL,
                      wxPyShape *object = NULL,
@@ -222,7 +232,7 @@ public:
 
 class wxPyBitmapShape : public wxPyRectangleShape {
 public:
-    %addtofunc wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
+    %pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)"
     
     wxPyBitmapShape();
 
@@ -272,7 +282,7 @@ public:
 
 class wxPyDrawnShape : public wxPyRectangleShape {
 public:
-    %addtofunc wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
+    %pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)"
     
     wxPyDrawnShape();
 
@@ -285,12 +295,14 @@ public:
     void DrawAtAngle(int angle);
     void DrawEllipticArc(const wxRect& rect, double startAngle, double endAngle);
     void DrawLine(const wxPoint& point1, const wxPoint& point2);
-    void DrawLines(int PCOUNT, wxPoint* points);
+    void DrawLines(int points, wxPoint* points_array);
     void DrawPoint(const wxPoint& point);
-    void DrawPolygon(int PCOUNT, wxPoint* points, int flags = 0);
+    
+    void DrawPolygon(int points, wxPoint* points_array, int flags = 0);
+    
     void DrawRectangle(const wxRect& rect);
     void DrawRoundedRectangle(const wxRect& rect, double radius);
-    void DrawSpline(int PCOUNT, wxPoint* points);
+    void DrawSpline(int points, wxPoint* points_array);
     void DrawText(const wxString& text, const wxPoint& point);
     int GetAngle();
 
@@ -377,7 +389,7 @@ public:
 
 class wxPyCompositeShape : public wxPyRectangleShape {
 public:
-    %addtofunc wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
+    %pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)"
     
     wxPyCompositeShape();
 
@@ -475,7 +487,7 @@ public:
 
 class wxPyDividedShape : public wxPyRectangleShape {
 public:
-    %addtofunc wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
+    %pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)"
     
     wxPyDividedShape(double width = 0.0, double height = 0.0);
 
@@ -525,7 +537,7 @@ public:
 
 class wxPyDivisionShape : public wxPyCompositeShape {
 public:
-    %addtofunc wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
+    %pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
     
     wxPyDivisionShape();