Overrides the standard draw_path to add the shadow offset and necessary color changes for the shadow.
(self, renderer, gc, tpath, affine, rgbFace)
| 255 | self._gc = kwargs |
| 256 | |
| 257 | def draw_path(self, renderer, gc, tpath, affine, rgbFace): |
| 258 | """ |
| 259 | Overrides the standard draw_path to add the shadow offset and |
| 260 | necessary color changes for the shadow. |
| 261 | """ |
| 262 | gc0 = renderer.new_gc() # Don't modify gc, but a copy! |
| 263 | gc0.copy_properties(gc) |
| 264 | |
| 265 | if self._shadow_rgbFace is None: |
| 266 | r, g, b = (rgbFace or (1., 1., 1.))[:3] |
| 267 | # Scale the colors by a factor to improve the shadow effect. |
| 268 | shadow_rgbFace = (r * self._rho, g * self._rho, b * self._rho) |
| 269 | else: |
| 270 | shadow_rgbFace = self._shadow_rgbFace |
| 271 | |
| 272 | gc0.set_foreground(mcolors.to_rgba("none"), isRGBA=True) |
| 273 | gc0.set_alpha(self._alpha) |
| 274 | gc0.set_linewidth(0) |
| 275 | |
| 276 | gc0 = self._update_gc(gc0, self._gc) |
| 277 | renderer.draw_path( |
| 278 | gc0, tpath, affine + self._offset_transform(renderer), |
| 279 | shadow_rgbFace) |
| 280 | gc0.restore() |
| 281 | |
| 282 | |
| 283 | withSimplePatchShadow = _subclass_with_normal(effect_class=SimplePatchShadow) |
nothing calls this directly
no test coverage detected