Check whether an *event* occurred on a canvas other that this artist's canvas. If this method returns True, the event definitely occurred on a different canvas; if it returns False, either it occurred on the same canvas, or we may not have enough information to know
(self, event)
| 488 | return [] |
| 489 | |
| 490 | def _different_canvas(self, event): |
| 491 | """ |
| 492 | Check whether an *event* occurred on a canvas other that this artist's canvas. |
| 493 | |
| 494 | If this method returns True, the event definitely occurred on a different |
| 495 | canvas; if it returns False, either it occurred on the same canvas, or we may |
| 496 | not have enough information to know. |
| 497 | |
| 498 | Subclasses should start their definition of `contains` as follows:: |
| 499 | |
| 500 | if self._different_canvas(mouseevent): |
| 501 | return False, {} |
| 502 | # subclass-specific implementation follows |
| 503 | """ |
| 504 | return (getattr(event, "canvas", None) is not None |
| 505 | and (fig := self.get_figure(root=True)) is not None |
| 506 | and event.canvas is not fig.canvas) |
| 507 | |
| 508 | def contains(self, mouseevent): |
| 509 | """ |
no test coverage detected