Changeset 592

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

notes and offset to prevent the top+left hand borders on pinwins from being obscured

Files:

Legend:

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

    r575 r592  
    9393        self.x_padding = int(self.padding / 2) 
    9494        self.y_padding = int(self.padding / 2) 
    95          
     95 
    9696        self.img_width = imgw 
    97         self.img_height = imgh 
    98          
     97        self.img_height = imgh         
     98                                        
    9999    # ########################################################## 
    100100     
     
    379379 
    380380        dr.pieslice((x1, y1, x2, y2), 90, 180, fill=fill)                 
    381         # dr.pieslice((x1, y1, x2, y2), 0, 360, outline='white') 
    382         # dr.line(c, fill='white')         
    383381 
    384382        # bottom right - this one has gaps but we don't 
     
    403401 
    404402        dr.pieslice((x1, y1, x2, y2), 0, 90, fill=fill)                 
    405         # dr.pieslice((x1, y1, x2, y2), 0, 360, outline='white') 
    406         # dr.line(c, fill='white') 
    407403 
    408404        # top right 
     
    426422 
    427423        dr.pieslice((x1, y1, x2, y2), 270, 0, fill=fill) 
    428         # dr.pieslice((x1, y1, x2, y2), 0, 360, outline='white') 
    429         # dr.line(c, fill='white') 
    430424 
    431425        if not blurry : 
     
    520514 
    521515        # add the pinwin 
    522          
    523         im.paste(pw, (0, 0), pw) 
     516 
     517        # note the offset; required so that the top and left 
     518        # side outlines of the pinwin don't obscured by the 
     519        # alpha channel; this also affects the values of dx 
     520        # and dy in plotting.draw_marker 
     521         
     522        im.paste(pw, (1,1), pw) 
    524523 
    525524        return im 
     
    531530        h = pw.size[1] 
    532531        w = max(pw.size[0], sh.size[0]) 
    533          
     532 
    534533        im = Image.new('RGBA', (w, h)) 
    535534        dr = ImageDraw.Draw(im) 
     
    537536        # add the shadow 
    538537 
    539         im.paste(sh, (0, 0), sh) 
     538        im.paste(sh, (0,0), sh) 
    540539         
    541540        #  add the dot 
     
    558557 
    559558        # add the pinwin 
    560          
    561         im.paste(pw, (0, 0), pw) 
     559 
     560        # note the offset; required so that the top and left 
     561        # side outlines of the pinwin don't obscured by the 
     562        # alpha channel; this also affects the values of dx 
     563        # and dy in plotting.draw_marker 
     564         
     565        im.paste(pw, (1,1), pw)  
    562566 
    563567        im.putalpha(al)