]> git.saurik.com Git - wxWidgets.git/commitdiff
Added GetCount, GetCountRGB, and GetCountColour methods to
authorRobin Dunn <robin@alldunn.com>
Fri, 25 Mar 2005 19:54:29 +0000 (19:54 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 25 Mar 2005 19:54:29 +0000 (19:54 +0000)
wx.ImageHistogram.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/docs/CHANGES.txt
wxPython/src/_image.i

index ce34cd01a76f4f7a4c9566ae53bf2d7d274052b1..01db0a71cb4278b3a3c978fb5dcd68d60ad6e914 100644 (file)
@@ -1,6 +1,26 @@
 Recent Changes for wxPython
 =====================================================================
 
+2.5.5.0
+-------
+
+wxMSW: Fixed bug #1022383, 'several ComboBoxes appear selected'
+
+wx.grid.Grid: Fixed bug #1163384.  Moved the code that handles
+activating the cell editors to a EVT_CHAR event handler.  This is done
+so the character inserted into the editor will be the "cooked" char
+value (including accented or composed keys) rather than the raw code
+provided by the EVT_KEY_DOWN event.  
+
+Added orient parameter to wx.MDIParentFrame.Tile()
+
+wxMSW: wxTextCtrl with wx.TE_RICH2 style now uses RichEdit 4.1 if
+available. 
+
+Added GetCount, GetCountRGB, and GetCountColour methods to
+wx.ImageHistogram. 
+
+
 
 2.5.4.1
 -------
index 658da260035a92cb50ca983f601c29cddbfd83da..27f48e9319fa20d09d2169675dc0f7f2337a5c5e 100644 (file)
@@ -68,6 +68,37 @@ public:
         "Find first colour that is not used in the image and has higher RGB
 values than startR, startG, startB.  Returns a tuple consisting of a
 success flag and rgb values.", "");
+
+    %extend {
+        DocStr(GetCount,
+               "Returns the pixel count for the given key.  Use `MakeKey` to create a
+key value from a RGB tripple.", "");
+        unsigned long GetCount(unsigned long key) {
+            wxImageHistogramEntry e = (*self)[key];
+            return e.value;
+        }
+
+        DocStr(GetCountRGB,
+               "Returns the pixel count for the given RGB values.", "");
+        unsigned long GetCountRGB(unsigned char r,
+                                  unsigned char g,
+                                  unsigned char b) {
+            unsigned long key = wxImageHistogram::MakeKey(r, g, b);
+            wxImageHistogramEntry e = (*self)[key];
+            return e.value;
+        }
+        
+        DocStr(GetCountColour,
+               "Returns the pixel count for the given `wx.Colour` value.", "");
+        unsigned long GetCountColour(const wxColour& colour) {
+            unsigned long key = wxImageHistogram::MakeKey(colour.Red(),
+                                                          colour.Green(),
+                                                          colour.Blue());
+            wxImageHistogramEntry e = (*self)[key];
+            return e.value;
+        }
+    }
+    
 };