Graphics
When we want to display 2D graphics or images on the screen, theCanvas object is needed in the application body. Canvas is a UI element
that provides a drawable area on the screen but it also provides support
for handling keyboard events, as we saw in Section 5.2. We showed how
to create a canvas object and how to assign it to the application body. We
also mentioned that it has an optional parameter, redraw callback,
that defines a callback function that is called whenever a part of the
canvas must be redrawn. Typically, this happens when the user switches
away from the Python application and back again or after a popup menu
is displayed.
No comments:
Post a Comment