Create a new hatch pattern
(self, gc, rgbFace)
| 505 | return transform + Affine2D().scale(1, -1).translate(0, self.height) |
| 506 | |
| 507 | def _get_hatch(self, gc, rgbFace): |
| 508 | """ |
| 509 | Create a new hatch pattern |
| 510 | """ |
| 511 | if rgbFace is not None: |
| 512 | rgbFace = tuple(rgbFace) |
| 513 | edge = gc.get_hatch_color() |
| 514 | if edge is not None: |
| 515 | edge = tuple(edge) |
| 516 | lw = gc.get_hatch_linewidth() |
| 517 | dictkey = (gc.get_hatch(), rgbFace, edge, lw) |
| 518 | oid = self._hatchd.get(dictkey) |
| 519 | if oid is None: |
| 520 | oid = self._make_id('h', dictkey) |
| 521 | self._hatchd[dictkey] = ((gc.get_hatch_path(), rgbFace, edge, lw), oid) |
| 522 | else: |
| 523 | _, oid = oid |
| 524 | return oid |
| 525 | |
| 526 | def _write_hatches(self): |
| 527 | if not len(self._hatchd): |
no test coverage detected