Changeset 591

Show
Ignore:
Timestamp:
07/05/08 20:28:22 (5 months ago)
Author:
asc
Message:

use the correct hash key when generating convex hulls, duh

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/py/wscompose/pinwin.py

    r501 r591  
    9393 
    9494        # 
    95          
     95 
    9696        if self.ctx.has_key('dots') : 
    9797            for data in self.ctx['dots'] : 
     
    149149 
    150150            points = [] 
    151              
    152             for coord in self.ctx[type] :  
    153  
     151 
     152            # sigh... 
     153            key = "%ss" % type 
     154             
     155            for coord in self.ctx[key] :  
    154156                pt = self.latlon_to_point(coord['latitude'], coord['longitude'])     
    155157                points.append((pt.x, pt.y)) 
    156158 
    157159            hull = convexhull.convexHull(points) 
    158  
     160             
    159161            # 
    160162            # no way to assign width to polygon outlines in PIL... 
     
    166168 
    167169            while i < cnt :  
    168  
    169170                (x1, y1) = hull[i] 
    170171                 
     
    178179                dr.line((x1, y1, x2, y2), fill=pink, width=6) 
    179180                i += 1 
    180              
     181 
    181182        return img 
    182183