MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _get_hatch

Method _get_hatch

lib/matplotlib/backends/backend_svg.py:507–524  ·  view source on GitHub ↗

Create a new hatch pattern

(self, gc, rgbFace)

Source from the content-addressed store, hash-verified

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):

Callers 1

_get_style_dictMethod · 0.95

Calls 6

_make_idMethod · 0.95
get_hatch_colorMethod · 0.80
get_hatch_pathMethod · 0.80
get_hatch_linewidthMethod · 0.45
get_hatchMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected