def do_render(self, c): def leftmost(node): x = node.pos[0] for ch in node.children: x = min(x, leftmost(ch)) return x self.apply_attributes(c) x, y = self.pos w, h = self.gsize xx = leftmost(self) VBoxNode.do_render(self, c) c.save() c.set_source_rgba(1, 0, 0, 1) c.set_source_rgba(0.7, 0.7, 0.7, 1) c.set_dash([2.0, 2.0], 0) c.rectangle(xx + 0.5, y + 0.5, w, h) c.stroke() c.restore()
def do_render(self, c): def leftmost(node): x = node.pos[0] for ch in node.children: x = min(x, leftmost(ch)) return x self.apply_attributes(c) x, y = self.pos w, h = self.gsize xx = leftmost(self) VBoxNode.do_render(self, c) c.save() c.set_source_rgba(1, 0, 0, 1) c.set_source_rgba(0.7, 0.7, 0.7, 1) c.set_dash([2.0, 2.0], 0) c.rectangle(xx+0.5, y+0.5, w, h) c.stroke() c.restore()
def do_render(self, c): VBoxNode.do_render(self, c) self.render_shadow(c)