Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Python4Kids New Tutorial: Being Animated

Jun 27, 2012, 03:00 (0 Talkback[s])
(Other stories by Brendan Scott)

In the last tutorial we looked at the Canvas widget from Tkinter and we also had a look at the concept of cartesian coordinate systems. In our example we could identify specific pixels by counting across and down from the top left of the canvas (ordinarily cartesian systems count left and up). We also bound the motion event to the canvas and used it to display the current coordinates of the mouse in the canvas. The reason we did this is because to draw anything on the canvas you need to know the coordinates of where it is to be drawn. In this tutorial we draw a line on the canvas (!!) and animate it so that it follows the mouse.

Complete Story

Related Stories: