| 266 | Primitive representing poly-curves (arbitrary number of points). |
| 267 | """ |
| 268 | def __init__(self, points=None, degree=None, color=None, width=2): |
| 269 | super(CurvePrim, self).__init__() |
| 270 | |
| 271 | # `width` of the curve, in pixels |
| 272 | self.width = width |
| 273 | # `color` of the curve (tuple of floats representing RGB components) |
| 274 | self.color = color or COLOR_BLACK |
| 275 | # `degree` represents the type of curve (i.e. linear or bezier) |
| 276 | self.degree = degree or CURVE_LINEAR |
| 277 | |
| 278 | self._points = list() # control points |
| 279 | self._drawPoints = list() # drawable points |
| 280 | self._prePoints = list() # pre-transform points |
| 281 | |
| 282 | if points: |
| 283 | self.points = points |
| 284 | |
| 285 | # `points` are the control points of the curve. |
| 286 | @property |