Friday, 31 October 2014

Draw image in GTK3

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.


  1. Define a drawing area using Cairo.
  2. Load the image into a pixbuf.
  3. Crop and resize the pixbuf.
  4. Show the pixbuf on the drawing area.

Source Code


No comments:

Post a Comment