An event triggered by a draw operation on the canvas. In most backends, callbacks subscribed to this event will be fired after the rendering is complete but before the screen is updated. Any extra artists drawn to the canvas's renderer will be reflected without an explicit call
| 1204 | |
| 1205 | |
| 1206 | class DrawEvent(Event): |
| 1207 | """ |
| 1208 | An event triggered by a draw operation on the canvas. |
| 1209 | |
| 1210 | In most backends, callbacks subscribed to this event will be fired after |
| 1211 | the rendering is complete but before the screen is updated. Any extra |
| 1212 | artists drawn to the canvas's renderer will be reflected without an |
| 1213 | explicit call to ``blit``. |
| 1214 | |
| 1215 | .. warning:: |
| 1216 | |
| 1217 | Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may |
| 1218 | not be safe with all backends and may cause infinite recursion. |
| 1219 | |
| 1220 | A DrawEvent has a number of special attributes in addition to those defined |
| 1221 | by the parent `Event` class. |
| 1222 | |
| 1223 | Attributes |
| 1224 | ---------- |
| 1225 | renderer : `RendererBase` |
| 1226 | The renderer for the draw event. |
| 1227 | """ |
| 1228 | def __init__(self, name, canvas, renderer): |
| 1229 | super().__init__(name, canvas) |
| 1230 | self.renderer = renderer |
| 1231 | |
| 1232 | |
| 1233 | class ResizeEvent(Event): |
no outgoing calls
searching dependent graphs…