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