dabo Commit
Revision 6503
Date: 2011-03-19 11:03:44 -0700 (Sat, 19 Mar 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6503

Changed:
U   trunk/demo/samples/dImage.py

Log:
Added flip horiz/vert buttons to dImage demo

Diff:
Modified: trunk/demo/samples/dImage.py
===================================================================
--- trunk/demo/samples/dImage.py        2011-03-19 18:03:06 UTC (rev 6502)
+++ trunk/demo/samples/dImage.py        2011-03-19 18:03:44 UTC (rev 6503)
@@ -37,10 +37,18 @@
 
                hsz = dabo.ui.dSizer("H")
                hsz.DefaultSpacing = 10
-               btn = dabo.ui.dBitmapButton(self, Picture="rotateCW", 
OnHit=self.rotateCW)
+               btn = dabo.ui.dBitmapButton(self, Picture="rotateCW",
+                               OnHit=self.onRotateCW, Size=(36, 36))
                hsz.append(btn)
-               btn = dabo.ui.dBitmapButton(self, Picture="rotateCCW", 
OnHit=self.rotateCCW)
+               btn = dabo.ui.dBitmapButton(self, Picture="rotateCCW",
+                               OnHit=self.onRotateCCW, Size=(36, 36))
                hsz.append(btn)
+               btn = dabo.ui.dBitmapButton(self, Picture="flip_horiz",
+                               OnHit=self.onFlipHoriz, Size=(36, 36))
+               hsz.append(btn)
+               btn = dabo.ui.dBitmapButton(self, Picture="flip_vert",
+                               OnHit=self.onFlipVert, Size=(36, 36))
+               hsz.append(btn)
 
                self.ddScale = dabo.ui.dDropdownList(self,
                                Choices = ["Proportional", "Stretch", "Clip"],
@@ -64,12 +72,18 @@
        def processDroppedFiles(self, filelist):
                self.img.Picture = filelist[0]
 
-       def rotateCW(self, evt):
+       def onRotateCW(self, evt):
                self.img.rotateClockwise()
 
-       def rotateCCW(self, evt):
+       def onRotateCCW(self, evt):
                self.img.rotateCounterClockwise()
 
+       def onFlipHoriz(self, evt):
+               self.img.flipHorizontally()
+
+       def onFlipVert(self, evt):
+               self.img.flipVertically()
+
        def onSlider(self, evt):
                slider = evt.EventObject
                val = slider.Value * 0.01



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to