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

Method _get_clippath_id

lib/matplotlib/backends/backend_svg.py:343–355  ·  view source on GitHub ↗

Returns a stable and unique identifier for the *clippath* argument object within the current rendering context. This allows plots that include custom clip paths to produce identical SVG output on each render, provided that the :rc:`svg.hashsalt` config setti

(self, clippath)

Source from the content-addressed store, hash-verified

341 self._write_default_style()
342
343 def _get_clippath_id(self, clippath):
344 """
345 Returns a stable and unique identifier for the *clippath* argument
346 object within the current rendering context.
347
348 This allows plots that include custom clip paths to produce identical
349 SVG output on each render, provided that the :rc:`svg.hashsalt` config
350 setting and the ``SOURCE_DATE_EPOCH`` build-time environment variable
351 are set to fixed values.
352 """
353 if clippath not in self._clip_path_ids:
354 self._clip_path_ids[clippath] = len(self._clip_path_ids)
355 return self._clip_path_ids[clippath]
356
357 def finalize(self):
358 self._write_clips()

Callers 1

_get_clip_attrsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected