def drawCopyright(im, dr, cfg):
    u'绘制版权信息'
    if (not cfg['copyright']):
        return
    font = getFontForPyGame(font_name=cfg['font-family'], font_size=12)
    rtext = font.render(cfg['copyright'], cfg['font-antialiasing'], (128, 128, 128), cfg['background-color'])
    sio = StringIO.StringIO()
    pygame.image.save(rtext, sio)
    sio.seek(0)
    copyright_im = Image.open(sio)
    (iw, ih) = im.size
    (cw, ch) = rtext.get_size()
    padding = cfg['padding']
    offset_y = ((ih - 32) - padding[2])
    if cfg['copyright-center']:
        cx = ((iw - cw) / 2)
    else:
        cx = cfg['padding'][3]
    cy = (offset_y + 12)
    dr.line([(padding[3], offset_y), ((iw - padding[1]), offset_y)], width=1, fill=(192, 192, 192))
    im.paste(copyright_im, (cx, cy))
绘制版权信息
def drawCopyright(im, dr, cfg):
    u
    if (not cfg['copyright']):
        return
    font = getFontForPyGame(font_name=cfg['font-family'], font_size=12)
    rtext = font.render(cfg['copyright'], cfg['font-antialiasing'], (128, 128, 128), cfg['background-color'])
    sio = StringIO.StringIO()
    pygame.image.save(rtext, sio)
    sio.seek(0)
    copyright_im = Image.open(sio)
    (iw, ih) = im.size
    (cw, ch) = rtext.get_size()
    padding = cfg['padding']
    offset_y = ((ih - 32) - padding[2])
    if cfg['copyright-center']:
        cx = ((iw - cw) / 2)
    else:
        cx = cfg['padding'][3]
    cy = (offset_y + 12)
    dr.line([(padding[3], offset_y), ((iw - padding[1]), offset_y)], width=1, fill=(192, 192, 192))
    im.paste(copyright_im, (cx, cy))