Excercise: Extended graphphics drawing on full canvas

Change the script from the "ex_graphics_drawing" exercise so, that it lets you change the size of the a colour point, its colour as well as the background of it, by pressing certain keys.

1. Use

- key 4 to shrink the colour point

- key 7 to increase the size of the colour point.

- key 6 to change colour of the point to yellow (0xffff00)

- Key 5 to change it to previous colour

- Key 9 to change the background colour to pink (0xff00ff)

- key 8 to change it to previous background colour


Example file: ex_extended_graphics_drawing.py


For further info what other graphics and text beside a point can be drawn, check out the app_body_canvas.py script or the API_Reference_for_Python.pdf





If you are bored:

Add in the current exercise script some limitations to the movements of the point, so it can not go outside the visible canvas.

You can also check out Nokia's ball.py example and modify it.
























Previous | Next | Menu     Copyright (c) 2006 Jurgen Scheible