]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/gdi.py
#undef Yield
[wxWidgets.git] / wxPython / src / msw / gdi.py
index 7beaa6536167bb6996d3659f5b87d6732caac7c6..314869001d4c7a0dd6789aa9d4294e93d9475957 100644 (file)
@@ -512,9 +512,6 @@ class wxPenPtr(wxGDIObjectPtr):
     def SetWidth(self, *_args, **_kwargs):
         val = apply(gdic.wxPen_SetWidth,(self,) + _args, _kwargs)
         return val
-    def GetDashes(self, *_args, **_kwargs):
-        val = apply(gdic.wxPen_GetDashes,(self,) + _args, _kwargs)
-        return val
     def SetDashes(self, *_args, **_kwargs):
         val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs)
         return val
@@ -535,6 +532,26 @@ class wxPen(wxPenPtr):
 
 
 
+class wxPyPenPtr(wxPenPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __del__(self,gdic=gdic):
+        if self.thisown == 1 :
+            gdic.delete_wxPyPen(self)
+    def SetDashes(self, *_args, **_kwargs):
+        val = apply(gdic.wxPyPen_SetDashes,(self,) + _args, _kwargs)
+        return val
+    def __repr__(self):
+        return "<C wxPyPen instance at %s>" % (self.this,)
+class wxPyPen(wxPyPenPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gdic.new_wxPyPen,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 class wxPenListPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
@@ -893,11 +910,39 @@ class wxDCPtr(wxObjectPtr):
     def ResetBoundingBox(self, *_args, **_kwargs):
         val = apply(gdic.wxDC_ResetBoundingBox,(self,) + _args, _kwargs)
         return val
+    def GetBoundingBox(self, *_args, **_kwargs):
+        val = apply(gdic.wxDC_GetBoundingBox,(self,) + _args, _kwargs)
+        return val
     def GetHDC(self, *_args, **_kwargs):
         val = apply(gdic.wxDC_GetHDC,(self,) + _args, _kwargs)
         return val
+    def _DrawPointList(self, *_args, **_kwargs):
+        val = apply(gdic.wxDC__DrawPointList,(self,) + _args, _kwargs)
+        return val
+    def _DrawLineList(self, *_args, **_kwargs):
+        val = apply(gdic.wxDC__DrawLineList,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxDC instance at %s>" % (self.this,)
+    
+    def DrawPointList(self, points, pens=None):
+        if pens is None:
+           pens = []
+        elif isinstance(pens, wxPenPtr):
+           pens = [pens]
+        elif len(pens) != len(points):
+           raise ValueError('points and pens must have same length')
+        return self._DrawPointList(points, pens)
+
+    def DrawLineList(self, lines, pens=None):
+        if pens is None:
+           pens = []
+        elif isinstance(pens, wxPenPtr):
+           pens = [pens]
+        elif len(pens) != len(lines):
+           raise ValueError('lines and pens must have same length')
+        return self._DrawLineList(lines, pens)
+
 class wxDC(wxDCPtr):
     def __init__(self,this):
         self.this = this