[gnome-music/wip/merge: 266/343] albumArt: don't recalculate degrees
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 266/343] albumArt: don't recalculate degrees
- Date: Thu, 25 Jul 2013 11:34:59 +0000 (UTC)
commit c7977ec9107e17922d24d7fe5927f4c32a513509
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Thu Jul 18 16:34:01 2013 +0200
albumArt: don't recalculate degrees
gnomemusic/albumArtCache.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumArtCache.py
index 2b0a12d..2e4c790 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumArtCache.py
@@ -10,6 +10,7 @@ from gnomemusic.grilo import Grilo as grilo
class AlbumArtCache:
instance = None
+ degrees = pi / 180
@classmethod
def get_default(self):
@@ -111,16 +112,15 @@ class AlbumArtCache:
return result
def _draw_rounded_path(self, ctx, x, y, width, height, radius):
- degrees = pi / 180
ctx.new_sub_path()
ctx.arc(x + width - radius, y + radius, radius - 0.5,
- -90 * degrees, 0 * degrees)
+ -90 * self.degrees, 0 * self.degrees)
ctx.arc(x + width - radius, y + height - radius, radius - 0.5,
- 0 * degrees, 90 * degrees)
+ 0 * self.degrees, 90 * self.degrees)
ctx.arc(x + radius, y + height - radius, radius - 0.5,
- 90 * degrees, 180 * degrees)
- ctx.arc(x + radius, y + radius, radius - 0.5, 180 * degrees,
- 270 * degrees)
+ 90 * self.degrees, 180 * self.degrees)
+ ctx.arc(x + radius, y + radius, radius - 0.5, 180 * self.degrees,
+ 270 * self.degrees)
ctx.close_path()
ctx.set_line_width(0.6)
ctx.set_source_rgb(0.2, 0.2, 0.2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]