-
Book Overview & Buying
-
Table Of Contents
Python 2.6 Graphics Cookbook
By :
In this chapter, we will cover:
Simple animation of a GIF beach ball
The vector walking creature
Bird with shoes walking in the karroo
Making a partially transparent image with Gimp
Diplomat walking at the palace
Spider in the forest
Moving band of images
Continuous band of images
Endless background – a passing cloudscape
Vector graphics as seen in Chapter 2, Drawing Fundamental Shapes and Chapter 3, Handling Text can be shrunk and expanded to any size and in any direction using simple algebra. They can be animated with rotations using basic trigonometry. Raster graphics are limited. They cannot be resized or rotated dynamically while the code is executing. They are more cumbersome. However, we can get tremendous effects when we combine both vector and raster graphics together. The one thing that Python cannot do is to rotate a GIF image by itself. There are ways of mimicking rotation reasonably but there are limitations you will appreciate after trying...
Change the font size
Change margin width
Change background colour