Set global stroke color or the color of the formatted string.
(self, c, w=0.5)
| 1237 | self._fill = c |
| 1238 | |
| 1239 | def stroke(self, c, w=0.5): |
| 1240 | """Set global stroke color or the color of the formatted string.""" |
| 1241 | if c is None: |
| 1242 | c = noColor |
| 1243 | elif isinstance(c, (tuple, list)): |
| 1244 | c = color(*c) |
| 1245 | elif isinstance(c, (int, float)): |
| 1246 | c = color(c) |
| 1247 | |
| 1248 | msg = 'FlatContext.stroke: Color "%s" is not Color instance' |
| 1249 | assert isinstance(c, Color), (msg % c) |
| 1250 | self._stroke = c |
| 1251 | |
| 1252 | if w is not None: |
| 1253 | self.strokeWidth(w) |
| 1254 | |
| 1255 | def textStroke(self, c, w=None): |
| 1256 | """ |
no test coverage detected