[kupfer] ui: Remove unneeded math import



commit c4c2de2f0f05e91a28a9c4a99088860960962360
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Mar 29 16:22:31 2011 +0200

    ui: Remove unneeded math import

 kupfer/ui/browser.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 80ca9d5..400a047 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1,7 +1,6 @@
 # -*- coding: UTF-8 -*-
 
 import itertools
-import math
 import signal
 import sys
 import textwrap
@@ -57,19 +56,20 @@ def make_rounded_rect(cr,x,y,width,height,radius):
 	"""
 	Draws a rounded rectangle with corners of @radius
 	"""
+	MPI = 3.1415926535897931
 	cr.save()
 
 	w,h = width, height
 
 	cr.move_to(radius, 0)
 	cr.line_to(w-radius,0)
-	cr.arc(w-radius, radius, radius, 3*math.pi/2, 2*math.pi)
+	cr.arc(w-radius, radius, radius, 3*MPI/2, 2*MPI)
 	cr.line_to(w, h-radius)
-	cr.arc(w-radius, h-radius, radius, 0, math.pi/2)
+	cr.arc(w-radius, h-radius, radius, 0, MPI/2)
 	cr.line_to(radius, h)
-	cr.arc(radius, h-radius, radius, math.pi/2, math.pi)
+	cr.arc(radius, h-radius, radius, MPI/2, MPI)
 	cr.line_to(0, radius)
-	cr.arc(radius, radius, radius, math.pi, 3*math.pi/2)
+	cr.arc(radius, radius, radius, MPI, 3*MPI/2)
 	cr.close_path()
 	cr.restore()
 



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