def displayForDebugging():
    return  # for faster output, don't display for debugging at all!
    global qdcanvas, canvas
    import piddleQD
    try:
        qdcanvas.clear()
    except:
        qdcanvas = piddleQD.QDCanvas()
    qdcanvas.drawImage(canvas.getImage(), 0, 0)
    # PATCH...
    bbox = canvas.getImage().getbbox()
    if bbox:
        qdcanvas.drawRect(bbox[0],
                          bbox[1],
                          bbox[2],
                          bbox[3],
                          edgeColor=blue,
                          fillColor=transparent)
    qdcanvas.flush()
Exemple #2
0
def test2():

    canvas = PILCanvas()
    testit(canvas, "Foogar", 20, 30)

    testit(canvas, "Foogar", 20, 90, font=Font(size=24))
    global dammit
    dammit = _pilFont(Font(size=24))

    testit(canvas, "Foogar", 20, 150, font=Font(face='courier', size=24))

    testit(canvas, "Foogar", 20, 240, font=Font(face='courier'))

    import piddleQD
    global qdcanvas
    try:
        qdcanvas.close()
    except:
        pass
    qdcanvas = piddleQD.QDCanvas()
    qdcanvas.drawImage(canvas.getImage(), 0, 0)