コード例 #1
0
    '''
    Image of Cambridge Map.
    '''
    def __init__(self, xoffset=0):
        self.xoffset = xoffset
    def wrap(self, *args):
        return (self.xoffset, 0)
    def draw(self):
        canvas = self.canv
        canvas.drawImage("centre2_8000_rotated.jpg", -10,-260, width=400,height=280)
        
# Create the styles for the document
logoStyle = ParagraphStyle('normal')
logoStyle.fontSize=16
logoStyle.leading=15
logoStyle.rightindent=5
logoStyle.backColor='grey'
#logoStyle.textColor='white'
logoStyle.borderWidth=5
logoStyle.borderColor='grey'

rightStyle = ParagraphStyle('normal')
rightStyle.alignment = TA_RIGHT
rightStyle.spaceBefore = 10

paraStyle = ParagraphStyle('normal')
paraStyle.spaceAfter = 10
paraStyle.alignment = TA_JUSTIFY

medStyle = ParagraphStyle('normal')
medStyle.fontSize = 8