Beispiel #1
0
    g.yShift = 0.1
    gr.graphics.append(g)

    gB = GramText(myStr)
    gB.cA = GramCoord()
    gB.cA.xPosn = g.cA.xPosn
    gB.cA.yPosn = g.cA.yPosn + 1
    gB.anchor = anch
    gB.color = 'orange'
    #gB.draw = 'blue!20'
    gB.lineThickness = 2
    gB.draw = True
    gB.textSize = theTextSize
    gB.rotate = 0
    gr.graphics.append(gB)

    if 0:
        gB = GramText(myStr)
        gB.cA = GramCoord()
        gB.cA.xPosn = g.cA.xPosn
        gB.cA.yPosn = g.cA.yPosn + 1
        gB.anchor = anch
        gB.draw = True
        gB.textSize = theTextSize
        gB.rotate = 30
        gr.graphics.append(gB)

#gr.showTextBB = True
gr.png()
gr.svg()
Beispiel #2
0
from gram import Gram
gr1 = Gram()
gr1.font = 'helvetica'
gr1.baseName = 'gramInGram'
gr1.text("Embedding gram", 0,0)
gr2 = Gram()
g = gr2.text("Embedded gram",0,0)
gr2.gX = 0.3
gr2.gY = 0.5
gr1.grams.append(gr2)
gr1.pdf()
gr1.svg()
Beispiel #3
0
from gram import Gram
gr = Gram()
gr.baseName = 'line'
gr.font = 'Helvetica'
gr.grid(0,0,4,4)
g = gr.line(1,1,2,3)
g.colour = 'black!20'
g.colour.transparent = True
g.lineThickness = 28. # pts
g = gr.line(3, 3.5, 2, 1)
g.lineThickness = 'semithick'
g.lineStyle = 'dashed'
# A default, un-modified line
gr.line(1, 3, 1.5, 0.5)
g = gr.line(3.5, 1, 3.5, 2)
g.lineThickness = 10
g.cap = 'rect'  # default butt
g = gr.text('some lines', 3,3)
g.anchor = 'north west'
g.textSize = 'normalsize'
gr.png()
gr.svg()
Beispiel #4
0
from gram import Gram
gr1 = Gram()
gr1.font = 'helvetica'
gr1.baseName = 'gramInGram'
gr1.text("Embedding gram", 0, 0)
gr2 = Gram()
g = gr2.text("Embedded gram", 0, 0)
gr2.gX = 0.3
gr2.gY = 0.5
gr1.grams.append(gr2)
gr1.pdf()
gr1.svg()