]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_gdi.py
Allow the OOR reference to be saved without doing an INCREF. This
[wxWidgets.git] / wxPython / src / msw / _gdi.py
index 4cc4861dffafae684d337a3b9b1725059fc91b9b..82eaab8ef1a7a6ff64d4498625863ca6e4679ce0 100644 (file)
@@ -249,6 +249,10 @@ class Palette(GDIObject):
         """GetRGB(self, int pixel) -> (R,G,B)"""
         return _gdi_.Palette_GetRGB(*args, **kwargs)
 
+    def GetColoursCount(*args, **kwargs):
+        """GetColoursCount(self) -> int"""
+        return _gdi_.Palette_GetColoursCount(*args, **kwargs)
+
     def Ok(*args, **kwargs):
         """Ok(self) -> bool"""
         return _gdi_.Palette_Ok(*args, **kwargs)
@@ -3639,31 +3643,24 @@ class DC(_core.Object):
         """
         return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
 
-    def SetOptimization(*args, **kwargs):
+    def ComputeScaleAndOrigin(*args, **kwargs):
         """
-        SetOptimization(self, bool optimize)
+        ComputeScaleAndOrigin(self)
 
-        If *optimize* is true this function sets optimization mode on. This
-        currently means that under X, the device context will not try to set a
-        pen or brush property if it is known to be set already. This approach
-        can fall down if non-wxWidgets code is using the same device context
-        or window, for example when the window is a panel on which the
-        windowing system draws panel items. The wxWidgets device context
-        'memory' will now be out of step with reality.
+        Performs all necessary computations for given platform and context
+        type after each change of scale and origin parameters. Usually called
+        automatically internally after such changes.
 
-        Setting optimization off, drawing, then setting it back on again, is a
-        trick that must occasionally be employed.
         """
-        return _gdi_.DC_SetOptimization(*args, **kwargs)
+        return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
 
-    def GetOptimization(*args, **kwargs):
-        """
-        GetOptimization(self) -> bool
+    def SetOptimization(self, optimize):
+        pass
+    def GetOptimization(self):
+        return False
 
-        Returns true if device context optimization is on. See
-        `SetOptimization` for .
-        """
-        return _gdi_.DC_GetOptimization(*args, **kwargs)
+    SetOptimization = wx._deprecated(SetOptimization)
+    GetOptimization = wx._deprecated(GetOptimization)
 
     def CalcBoundingBox(*args, **kwargs):
         """