37 |
def testWH(): |
def testWH(): |
38 |
"""Tests that TextVob is drawn with the width and height |
"""Tests that TextVob is drawn with the width and height |
39 |
that it claims with getWidth() and getHeight(). |
that it claims with getWidth() and getHeight(). |
|
|
|
|
fail: AWT |
|
40 |
""" |
""" |
41 |
for text_scale in range(1,5): |
for text_scale in range(1, 4): |
42 |
vs = getvs() |
vs = getvs() |
43 |
size = vs.getSize() |
size = vs.getSize() |
44 |
vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red)) |
vs.map.put(gzz.vob.vobs.SolidBgVob(Color.red)) |
66 |
checkNotAvgColor(100, 100+text_height-1, text_width, text_depth+1, (255, 0, 0), delta=1) |
checkNotAvgColor(100, 100+text_height-1, text_width, text_depth+1, (255, 0, 0), delta=1) |
67 |
|
|
68 |
"""The top side.""" |
"""The top side.""" |
69 |
checkAvgColor(100, 100-10, text_width, 10, (255, 0, 0), delta=1) |
checkAvgColor(100, 100-10, text_width, 10, (255, 0, 0), delta=20) |
70 |
|
|
71 |
"""The left side.""" |
"""The left side.""" |
72 |
checkAvgColor(100-10, 100, 10, text_height+text_depth, (255, 0, 0), delta=1) |
checkAvgColor(100-10, 100, 10, text_height+text_depth, (255, 0, 0), delta=20) |
73 |
|
|
74 |
"""The right side.""" |
"""The right side.""" |
75 |
checkAvgColor(100+text_width+1, 100, 10, text_height+text_depth, (255, 0, 0), delta=1) |
checkAvgColor(100+text_width+1, 100, 10, text_height+text_depth, (255, 0, 0), delta=20) |
76 |
|
|
77 |
"""The bottom side.""" |
"""The bottom side.""" |
78 |
checkAvgColor(100, 100+text_height+text_depth+1, text_width, 10, (255, 0, 0), delta=1) |
checkAvgColor(100, 100+text_height+text_depth+1, text_width, 10, (255, 0, 0), delta=20) |
79 |
|
|
80 |
# : vim: set syntax=python : |
# : vim: set syntax=python : |