Ejemplo n.º 1
0
 def __init__(self, x, y, width, height):
     logo = RL_CorpLogo()
     logo.x = x
     logo.y = y
     logo.width = width
     logo.height = height
     self.logo = logo
Ejemplo n.º 2
0
def test(outDir='out-svg'):
    # print all drawings and their doc strings from the test
    # file
    if not os.path.isdir(outDir):
        os.mkdir(outDir)
    #grab all drawings from the test module
    from reportlab.graphics import testshapes
    drawings = []

    for funcname in dir(testshapes):
        #if funcname[0:11] == 'getDrawing2':
        #    print 'hacked to only show drawing 2'
        if funcname[0:10] == 'getDrawing':
            drawing = eval('testshapes.' + funcname + '()')
            docstring = eval('testshapes.' + funcname + '.__doc__')
            drawings.append((drawing, docstring))

    i = 0
    for (d, docstring) in drawings:
        filename = os.path.join(outDir, 'renderSVG_%d.svg' % i)
        drawToFile(d, filename)
        i += 1

    from reportlab.graphics.testshapes import getDrawing01
    d = getDrawing01()
    drawToFile(d, os.path.join(outDir, "test.svg"))

    from reportlab.lib.corp import RL_CorpLogo
    from reportlab.graphics.shapes import Drawing

    rl = RL_CorpLogo()
    d = Drawing(rl.width, rl.height)
    d.add(rl)
    drawToFile(d, os.path.join(outDir, "corplogo.svg"))
Ejemplo n.º 3
0
def test2():
    from reportlab.lib.corp import RL_CorpLogo
    from reportlab.graphics.shapes import Drawing

    rl = RL_CorpLogo()
    d = Drawing(rl.width,rl.height)
    d.add(rl)
    drawToFile(d, "svgout/corplogo.svg")
Ejemplo n.º 4
0
 def __init__(self, x, y, width, height):
     logo = RL_CorpLogo()
     logo.x = x
     logo.y = y
     logo.width = width
     logo.height = height
     self.logo = logo