From 670592122aecdef625ab3a74e0ded93f34eb54a4 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Mon, 18 Feb 2013 19:41:35 +0000 Subject: [PATCH] Geography : bug #06451 note 27413 : the ellipse become a line when it is too small svn: r21370 --- gramps/plugins/lib/maps/lifewaylayer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/lib/maps/lifewaylayer.py b/gramps/plugins/lib/maps/lifewaylayer.py index ad6bca480..29c2adfab 100644 --- a/gramps/plugins/lib/maps/lifewaylayer.py +++ b/gramps/plugins/lib/maps/lifewaylayer.py @@ -128,10 +128,11 @@ class LifeWayLayer(GObject.GObject, osmgpsmap.MapLayer): conv_pt2 = osmgpsmap.MapPoint.new_degrees(point[0], point[1]+rds) coord_x2, coord_y2 = gpsmap.convert_geographic_to_screen(conv_pt2) cox = abs(coord_x2-coord_x1) - cox = cox if cox > 0.001 else 0.001 - coy = coy if coy > 0.001 else 0.001 + cox = cox if cox > 1.2 else 1.2 + coy = coy if coy > 1.2 else 1.2 coz = abs( 1.0 / float(cox) * float(coy) ) - coz = coz if coz > 0.001 else 0.001 + coz = coz if coz > 1.2 else 1.2 + print coz, cox, coy ctx.save() ctx.scale(1.0,coz) ctx.move_to(coord_x1, coord_y1)