An event triggered by a canvas resize. A ResizeEvent has a number of special attributes in addition to those defined by the parent `Event` class. Attributes ---------- width : int Width of the canvas in pixels. height : int Height of the canvas in pixel
| 1231 | |
| 1232 | |
| 1233 | class ResizeEvent(Event): |
| 1234 | """ |
| 1235 | An event triggered by a canvas resize. |
| 1236 | |
| 1237 | A ResizeEvent has a number of special attributes in addition to those |
| 1238 | defined by the parent `Event` class. |
| 1239 | |
| 1240 | Attributes |
| 1241 | ---------- |
| 1242 | width : int |
| 1243 | Width of the canvas in pixels. |
| 1244 | height : int |
| 1245 | Height of the canvas in pixels. |
| 1246 | """ |
| 1247 | |
| 1248 | def __init__(self, name, canvas): |
| 1249 | super().__init__(name, canvas) |
| 1250 | self.width, self.height = canvas.get_width_height() |
| 1251 | |
| 1252 | |
| 1253 | class CloseEvent(Event): |
no outgoing calls
no test coverage detected
searching dependent graphs…