76 |
"""The bottom side.""" |
"""The bottom side.""" |
77 |
checkAvgColor(100, 100+text_height+text_depth+10, text_width, 10, (255, 0, 0), delta=1) |
checkAvgColor(100, 100+text_height+text_depth+10, text_width, 10, (255, 0, 0), delta=1) |
78 |
|
|
79 |
|
|
80 |
|
def testEmpty(): |
81 |
|
text_scale = 1 |
82 |
|
vs = getvs() |
83 |
|
size = vs.getSize() |
84 |
|
vs.map.put(vob.vobs.SolidBackdropVob(Color.red)) |
85 |
|
textvob = vob.vobs.TextVob(sty1, None) |
86 |
|
|
87 |
|
text_width = int(textvob.getWidth(text_scale)) |
88 |
|
text_height = int(textvob.getHeight(text_scale)) |
89 |
|
text_depth = int(textvob.getDepth(text_scale)) |
90 |
|
|
91 |
|
cs = vs.orthoBoxCS(0, "window", 0, 100, 100, 1, 1, size.width, size.height) |
92 |
|
cs_text = vs.orthoCS(cs, "text", 0, 0, 0, text_height + text_depth, text_height + text_depth) |
93 |
|
vs.map.put(textvob, cs_text) |
94 |
|
render(vs) |
95 |
|
|
96 |
|
|
97 |
# : vim: set syntax=python : |
# : vim: set syntax=python : |