Re: efficient use of canvas lines



>The way I solved the display problem is by creating my own simplistic
>canvas widget called gtk image viewer. Whenever the widget is scrolled
 ^^^^^^^^^^^^^
 *************

>or zoomed (either by a program or by the default gimp like bindings)
>an exposure event is generated. In that exposure event it is possible
>to do gdk_draw_foo() etc. The widget provides convenience functions
>for going back and forth between the coordinate systems of the image and
>the widget. In giv I draw the vector graphics by storing the vectors in
>compact GArrays and iterating over the array whenever I get an exposure
>event. A more efficient approach might be built by storing the vectors
>in e.g. an octree.
>
>giv also includes code to generate postscript out of the vector graphics.
>But this part really could be improved.

is there a reason to not use the canvas widget itself?

--p




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