31 |
class TestViewContext(ViewContext): |
class TestViewContext(ViewContext): |
32 |
def __init__(self): |
def __init__(self): |
33 |
self.space = ModularSpace(*tools.spaceArgList()) |
self.space = ModularSpace(*tools.spaceArgList()) |
34 |
self.style = GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 10) |
self.style = GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 14) |
35 |
|
|
36 |
self.d = [self.space.getDim(d_1), |
self.d = [self.space.getDim(d_1), |
37 |
self.space.getDim(d_2), |
self.space.getDim(d_2), |
77 |
putnoc(vs, background(self.bgcolor)) |
putnoc(vs, background(self.bgcolor)) |
78 |
|
|
79 |
context = TestViewContext() |
context = TestViewContext() |
80 |
contentBox = vs.orthoBoxCS(0, "content", 0, 100, 100, 1, 1, |
contentBox = vs.orthoBoxCS(0, "content", 0, 0, 0, 1, 1, |
81 |
self.size.width, self.size.height) |
self.size.width, self.size.height) |
82 |
context.v.render(vs, contentBox, context) |
context.v.render(vs, contentBox, context) |
83 |
|
|
95 |
|
|
96 |
def render(self, intoVS, intoCS, context): |
def render(self, intoVS, intoCS, context): |
97 |
c = context.getAccursed() |
c = context.getAccursed() |
98 |
box = intoVS.orthoBoxCS(intoCS, c, 0, 0, 0, 1, 1, 100, 100) |
box = intoVS.orthoBoxCS(intoCS, "cell", 0, 100, 100, 5, 5, 100, 100) |
99 |
cv = context.getCellView() |
cv = context.getCellView() |
100 |
cv.place(c, intoVS, box, context) |
cv.place(c, intoVS, box, context) |
101 |
print c.t() |
print c.t() |