36 |
def getCursorOffset(self, *args): |
def getCursorOffset(self, *args): |
37 |
return 0 |
return 0 |
38 |
|
|
39 |
def testSingle(): |
bgc = (0, 0, 255) |
40 |
|
|
41 |
|
def checkbox(x, y, w, h, color): |
42 |
|
# Check that edges are background-colored |
43 |
|
checkAvgColor(x-2, y-2, w+20, 1, bgc) |
44 |
|
checkAvgColor(x-2, y-2, 1, h+20, bgc) |
45 |
|
checkAvgColor(x-2, y+h+1, w+20, 1, bgc) |
46 |
|
checkAvgColor(x+w+1, y-2, 1, h+20, bgc) |
47 |
|
|
48 |
|
# Check that center is of given color |
49 |
|
checkAvgColor(x+3, y+3, w-6, h-6, color) |
50 |
|
|
51 |
|
# Finally, should check edge color! |
52 |
|
|
53 |
|
def testSingle__failing_solidbgvob(): |
54 |
vs = getvs() |
vs = getvs() |
55 |
vs.map.put(SolidBgVob(Color.blue)) |
vs.map.put(SolidBgVob(Color.blue)) |
56 |
|
|
63 |
|
|
64 |
render(vs) |
render(vs) |
65 |
|
|
66 |
|
checkbox(100, 100, 200, 50, (255,255,255)) |
67 |
|
|
68 |
# : vim: set syntax=python : |
# : vim: set syntax=python : |