Mercurial > code > home > repos > light9
view lib/goocanvas_compat.py @ 1493:4294ed82ee16
move collector_loadtest and arrange for collector to be able to run the test itself, but that last part isn't working. you can run collector and collector_loadtest in two shells, though
Ignore-this: 9f32a0cb0ba3c1b29ccbe7330ed15bf4
author | drewp@bigasterisk.com |
---|---|
date | Mon, 13 Jun 2016 20:04:11 +0000 |
parents | 2d2be076754f |
children |
line wrap: on
line source
from gi.repository import GooCanvas def Points(pts): cp = GooCanvas.CanvasPoints.new(len(pts)) for i, (x, y) in enumerate(pts): cp.set_point(i, x, y) return cp def polyline_new_line(parent, x0=None, y0=None, x1=None, y1=None, points=None, **props): p = GooCanvas.CanvasPolyline() p.set_property('parent', parent) if x0 is not None or points is not None: pts = points or Points([(x0, y0), (x1, y1)]) p.set_property('points', pts) for k, v in props.items(): p.set_property(k, v) return p