Goocanvas : performance problem with goocanvas group ?



Hi Goocanvas users and developers,

I'm currently working on a program that uses goocanvas widget on GTK+. I need to create an item group with several goocanvas items like rectangles and a text. The group can be moved in a canvas with the mouse, exactly like in goocanvas demo found in goocanvas package. So i decided to take back the example for my necessity.
However, if i have succeeded to draw correctly the goocanvas group and moving the group with mouse runs, my test program is always catching the cpu load at about 20 % (and moving item group is very slow) even if i don't do anything on the canvas. I'm not able to find the origin of the problem. If i replace the goocanvas group by a simple item (just a rectangle) like in the demo, there's no cpu overload. Furthermore, there's a strange "phantom" on the canvas of my item group text that it's deleted when i move my item group over it.

You can find in attached file an archive containing codes of my test program (main_patch.c goopatch.h and goopatch.c) and you can compile like this :
gcc -Wall -g -o testprogram -export-dynamic `pkg-config --cflags --libs gtk+-2.0 goocanvas` goopatch.h goopatch.c main_patch.c



Any help would be grateful, and many thanks in advance.


Alex.

Attachment: test_program_alex_vasic.tar.bz2
Description: BZip2 compressed data



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