summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fringlib/fringrenderer.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/fringlib/fringrenderer.py b/src/fringlib/fringrenderer.py
index c5f8273..9b92418 100644
--- a/src/fringlib/fringrenderer.py
+++ b/src/fringlib/fringrenderer.py
@@ -78,14 +78,12 @@ class FringRenderer:
accumulated = 0
last = start_angle
- if datacontents is None: return
- for fn, contents, d in datacontents:
+ for entry in datacontents:
+ fn, contents, value = entry
- if contents == None: hasContents = False
- else: hasContents = True
+ hasContents = contents != None
start = last
- value = d # third tuple element now *always* contains the size
accumulated += value
if datasize == 0: continue
@@ -96,7 +94,6 @@ class FringRenderer:
p = previouspath+os.sep+fn
self.lookup_data[ring].append( Segment(hasContents , p, value, start, end) )
- v = start_hue + (end_hue-start_hue)*1.0*i/n
color = self._choose_color(start_hue + (end_hue-start_hue)*1.0*i/n, ring)
r = self.INNER_RADIUS + ring * (self.RING_RADIUS + self.RING_SPACE)
@@ -113,8 +110,9 @@ class FringRenderer:
ctx.stroke()
if hasContents and ring+1 < self.RINGS_MAX:
- self.draw_segment(ctx, ring+1, start, end, v,
- start_hue + (end_hue-start_hue)*1.0*(i+1)/n, (fn, contents, d),
+ self.draw_segment(ctx, ring+1, start, end,
+ start_hue + (end_hue-start_hue)*1.0*i/n,
+ start_hue + (end_hue-start_hue)*1.0*(i+1)/n, entry,
previouspath+os.sep+fn)
r += self.RING_RADIUS/2