Tweaks to use inplace arithmetic
svn: r13184
This commit is contained in:
parent
03dc41bff9
commit
a052bc3c63
@ -195,8 +195,8 @@ class GVDocBase(BaseDoc, GVDoc):
|
||||
xmargin = self._paper.get_left_margin() / 2.54
|
||||
ymargin = self._paper.get_top_margin() / 2.54
|
||||
|
||||
sizew = sizew * self.hpages
|
||||
sizeh = sizeh * self.vpages
|
||||
sizew *= self.hpages
|
||||
sizeh *= self.vpages
|
||||
|
||||
self.write( 'digraph GRAMPS_graph\n' )
|
||||
self.write( '{\n' )
|
||||
|
@ -134,7 +134,6 @@ class GenChart(object):
|
||||
new_y = 0
|
||||
for key, i in self.array.iteritems():
|
||||
old_y = key
|
||||
print __name__, i
|
||||
if self.not_blank(i.itervalues()):
|
||||
self.compress_map[old_y] = new_y
|
||||
new_array[new_y] = i
|
||||
@ -317,11 +316,11 @@ class AncestorTree(Report):
|
||||
|
||||
bw = calc_width / (uw/maxx)
|
||||
bh = self.box_height / (self.uh/maxy)
|
||||
|
||||
|
||||
self.scale = max(bw ,bh)
|
||||
self.box_width = self.box_width / self.scale
|
||||
self.box_height = self.box_height / self.scale
|
||||
self.box_pad_pts = self.box_pad_pts / self.scale
|
||||
self.box_width /= self.scale
|
||||
self.box_height /= self.scale
|
||||
self.box_pad_pts /= self.scale
|
||||
|
||||
maxh = int(self.uh / self.box_height)
|
||||
maxw = int(uw / calc_width)
|
||||
|
@ -341,12 +341,12 @@ class DescendTree(Report):
|
||||
|
||||
bw = (calc_width/(uw/(maxx+1)))
|
||||
bh = (self.box_height*(1.25)+self.box_gap)/(self.uh/maxy)
|
||||
|
||||
|
||||
self.scale = max(bw/2, bh)
|
||||
self.box_width = self.box_width/self.scale
|
||||
self.box_height = self.box_height/self.scale
|
||||
self.box_pad_pts = self.box_pad_pts/self.scale
|
||||
self.box_gap = self.box_gap/self.scale
|
||||
self.box_width /= self.scale
|
||||
self.box_height /= self.scale
|
||||
self.box_pad_pts /= self.scale
|
||||
self.box_gap /= self.scale
|
||||
|
||||
# maxh = int((self.uh)/(self.box_height+self.box_gap))
|
||||
maxw = int(uw/calc_width)
|
||||
|
@ -264,9 +264,9 @@ class FanChartWidget(gtk.Widget):
|
||||
stop_rad = stop * math.pi/180
|
||||
r,g,b = self.GENCOLOR[generation % len(self.GENCOLOR)]
|
||||
if gender == gen.lib.Person.MALE:
|
||||
r -= r * .10
|
||||
g -= g * .10
|
||||
b -= b * .10
|
||||
r *= .9
|
||||
g *= .9
|
||||
b *= .9
|
||||
radius = generation * self.pixels_per_generation + self.center
|
||||
# If max generation, and they have parents:
|
||||
if generation == self.generations - 1 and parents:
|
||||
@ -364,7 +364,7 @@ class FanChartWidget(gtk.Widget):
|
||||
|
||||
def show_parents(self, generation, selected, angle, slice):
|
||||
if generation >= self.generations: return
|
||||
selected = selected * 2
|
||||
selected *= 2
|
||||
self.angle[generation][selected][0] = angle
|
||||
self.angle[generation][selected][1] = angle + slice
|
||||
self.angle[generation][selected][3] = self.NORMAL
|
||||
|
Loading…
Reference in New Issue
Block a user