The script shows some techniques in drawing an image using Cairo. The image will be resized correctly even if the dimensions of the window is changed.
- Define a drawing area using Cairo.
- Load the image into a pixbuf.
- Crop and resize the pixbuf.
- Show the pixbuf on the drawing area.
Source Code
No comments:
Post a Comment