[hamster-applet] don't save and restore contexts on each save - should be fairly inneficient



commit 13d40be133f603b53445358819d30b04d936d683
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sat Dec 5 19:21:41 2009 +0000

    don't save and restore contexts on each save - should be fairly inneficient

 hamster/graphics.py |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/hamster/graphics.py b/hamster/graphics.py
index 3c5f9d7..7384d42 100644
--- a/hamster/graphics.py
+++ b/hamster/graphics.py
@@ -106,18 +106,14 @@ class Area(gtk.DrawingArea):
         self.context.rectangle(x, y, w, h)
     
     def fill_area(self, x, y, w, h, color, opacity = 0):
-        self.context.save()
         self.__rectangle(x, y, w, h, color, opacity)
         self.context.fill()
-        self.context.restore()
         
     def fill_rectangle(self, x, y, w, h, color, opacity = 0):
-        self.context.save()
         self.__rectangle(x, y, w, h, color, opacity)
         self.context.fill_preserve()
         self.set_color(color)
         self.context.stroke()
-        self.context.restore()
 
     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]