| 277 | g.render() |
| 278 | |
| 279 | class PolyLine(Geom): |
| 280 | def __init__(self, v, close): |
| 281 | Geom.__init__(self) |
| 282 | self.v = v |
| 283 | self.close = close |
| 284 | self.linewidth = LineWidth(1) |
| 285 | self.add_attr(self.linewidth) |
| 286 | def render1(self): |
| 287 | glBegin(GL_LINE_LOOP if self.close else GL_LINE_STRIP) |
| 288 | for p in self.v: |
| 289 | glVertex3f(p[0], p[1],0) # draw each vertex |
| 290 | glEnd() |
| 291 | def set_linewidth(self, x): |
| 292 | self.linewidth.stroke = x |
| 293 | |
| 294 | class Line(Geom): |
| 295 | def __init__(self, start=(0.0, 0.0), end=(0.0, 0.0)): |
no outgoing calls
no test coverage detected