cifrado r81 - in trunk: . package/cifrado



Author: bersace
Date: Fri Apr  4 15:51:03 2008
New Revision: 81
URL: http://svn.gnome.org/viewvc/cifrado?rev=81&view=rev

Log:
Supprime l'argument width inutile pour l'impression de layout.


Modified:
   trunk/ChangeLog
   trunk/package/cifrado/cifrado.py

Modified: trunk/package/cifrado/cifrado.py
==============================================================================
--- trunk/package/cifrado/cifrado.py	(original)
+++ trunk/package/cifrado/cifrado.py	Fri Apr  4 15:51:03 2008
@@ -829,7 +829,6 @@
                                   align=pango.ALIGN_RIGHT)
         w, h = layout.get_size()
         self.impr_layout(contexte, layout,
-                         x=contexte.get_width() - w/pango.SCALE,
                          y=contexte.get_height() - h/pango.SCALE)
 
         # sÃparateur
@@ -877,7 +876,6 @@
 
         for layout in layouts:
             self.impr_layout(contexte, layout,
-                             width=mw,
                              x=contexte.get_width()-mw,
                              y=y/pango.SCALE)
             w,h = layout.get_size()
@@ -887,8 +885,6 @@
         cr.new_path()
         cr.save()
         cr.set_source_rgb(.5, .5, .5)
-        print contexte.get_width()-il-mw, hh+il
-        print y
 
         cr.move_to(contexte.get_width()-(2*il)/pango.SCALE-mw,
                    hh/pango.SCALE)
@@ -896,7 +892,6 @@
         cr.set_line_width(.5)
         cr.stroke()
         cr.restore()
-
         
         # Original
         self.impr_text(contexte, message.message,
@@ -933,9 +928,7 @@
         layout.set_text(text)
         return layout
 
-    def impr_layout(self, contexte, layout,x=0,y=0,width=None):
-        if width is None:
-            width = (contexte.get_width()-x) * pango.SCALE
+    def impr_layout(self, contexte, layout,x=0,y=0):
         cr = contexte.get_cairo_context()
         cr.move_to(x, y)
         cr.layout_path(layout)
@@ -948,8 +941,10 @@
                   font='sans normal 9',
                   justify=False):
         """return layout size in pango unit"""
+        if width is None:
+            width = (contexte.get_width()-x) * pango.SCALE
         layout = self.layout_text(contexte, text, width, align, font, justify)
-        return self.impr_layout(contexte, layout,x,y,width)
+        return self.impr_layout(contexte, layout,x,y)
 
     def impr_page_chef(self, op, contexte, no):
         cr = contexte.get_cairo_context()



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