[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[newbie] How to plot to drawing_area



Hi.

I started learning a little gtk+2.0 a few days ago. I liked it a lot, 
it seems within the reach of an amateur programmer like myself.

Often a good way to learn a new language/library/framework is to set 
oneself a goal, and then learn all that is necessary along the way to 
achieve that goal.

I understand the basic concept of callback functions, and packing 
widgets, and connecting the signals.

I decided it would be great if I could learn how to plot an image to a 
window, pixel by pixel. Getting the  image is no problem at all, since 
I wrote a simple c++ class that uses libpng 
(<http://pngwriter.sourceforge.net/>).
The plotting part is what is holding me up.

I have looked at the scribble program that is given as an example, but 
I must say that the lack of a chapter on drawing_area widgets in the 
tutorial isn't helping me one bit!

I wonder if someone would be kind enough to point me to some code, that 
showed me how to set the foreground colour (with a simple RGB triplet) 
and then plot a given pixel.

Thanks in advance!

Paul




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]