[gimp/gimp-2-8] text-brush: fix TypeError exception (rhbz#827826)



commit b121388b03073496a9df713830c16f2eef05ea99
Author: Nils Philippsen <nils redhat com>
Date:   Wed Jun 6 14:07:11 2012 +0200

    text-brush: fix TypeError exception (rhbz#827826)

 plug-ins/pygimp/plug-ins/text-brush.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/pygimp/plug-ins/text-brush.py b/plug-ins/pygimp/plug-ins/text-brush.py
index 0070a3e..091c178 100755
--- a/plug-ins/pygimp/plug-ins/text-brush.py
+++ b/plug-ins/pygimp/plug-ins/text-brush.py
@@ -25,9 +25,10 @@ gettext.install("gimp20-python", gimp.locale_directory, unicode=True)
 def text_brush(font_name, font_size, text):
     pdb.gimp_context_push()
     pdb.gimp_context_set_default_colors()
-    
-    padding = font_size // 4
-    img = gimp.Image(font_size + padding, font_size + padding, GRAY)
+
+    font_size_int = int(font_size)
+    padding = font_size_int // 4
+    img = gimp.Image(font_size_int + padding, font_size_int + padding, GRAY)
     img.undo_freeze()
     
     text = text.decode("utf-8")



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