def draw(self, x, y, w=40, h=40): try: from web import _ctx except: pass from plotdevice.grobs import RGB for r,g,b in self: _ctx.colormode(RGB) _ctx.fill(r,g,b) _ctx.rect(x, y, w, h) x += w
def draw(self, x, y, w=40, h=40): try: from web import _ctx except: pass from nodebox.graphics import RGB for r,g,b in self: _ctx.colormode(RGB) _ctx.fill(r,g,b) _ctx.rect(x, y, w, h) x += w