PDA

View Full Version : How to create a cairo context using Ubuntu Quickly



dandyling
June 4th, 2012, 01:32 PM
Hi, everyone. I have just recently installed Ubuntu and felt in love with the Unity interface. Currently, I am learning to create an Ubuntu application, and got started with Ubuntu Quickly. I have no prior experience with python and Gtk+ (knows C++, Java etc), but not much prior experience in user-interface programming.

I installed 'quickly', and followed this video tutorial at http://developer.ubuntu.com/get-started/

I want to write a paint program.

I first started a new project by:
quickly create ubuntu-application paint

This is where I have problem to proceed. I have glimpse through python and Gtk+ tutorials to get an idea about how to do it. And from the following posts it seems like I need to use cairo.
http://stackoverflow.com/questions/10270795/drawing-in-pygobject-python3
http://stackoverflow.com/questions/8608686/python-gtk-canvas

I created the following interface (image attached) using Glade. I added a DrawingArea widget. However, I have no idea on how to associate the DrawingArea widget (created using Glade) to a cairo interface.

Can somebody give some heads up (in the context of Ubuntu Quickly?) Your help is very much appreciated. Thank you very much.