[hamster-applet] rectangle function sometimes comes handy



commit b922d9858b5b388aff39b6141b6e0a6db7fb5ec3
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sun Dec 20 18:10:32 2009 +0000

    rectangle function sometimes comes handy

 hamster/graphics.py |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/hamster/graphics.py b/hamster/graphics.py
index 7384d42..828ba09 100644
--- a/hamster/graphics.py
+++ b/hamster/graphics.py
@@ -101,19 +101,13 @@ class Area(gtk.DrawingArea):
     
 
     """ drawing on canvas bits """
-    def __rectangle(self, x, y, w, h, color, opacity = 0):
+    def rectangle(self, x, y, w, h, color, opacity = 0):
         self.set_color(color, opacity)
         self.context.rectangle(x, y, w, h)
     
     def fill_area(self, x, y, w, h, color, opacity = 0):
-        self.__rectangle(x, y, w, h, color, opacity)
+        self.rectangle(x, y, w, h, color, opacity)
         self.context.fill()
-        
-    def fill_rectangle(self, x, y, w, h, color, opacity = 0):
-        self.__rectangle(x, y, w, h, color, opacity)
-        self.context.fill_preserve()
-        self.set_color(color)
-        self.context.stroke()
 
     def set_text(self, text):
         # sets text and returns width and height of the layout



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]