Re: Drawing lines in a gtk_layout



Tomas Berndtsson <tomas nocrew org> writes:
> Havoc Pennington <hp redhat com> writes:
> 
> > Drawing to a layout you have to draw to layout->bin_window and offset
> > by layout->xoffset and layout->yoffset.
> 
> Will it get automatically redrawn, if you scroll the layout around in
> a window?

If you connect to expose_event on the layout and draw, then yes.

> When I've done this, I've put a GtkDrawingArea on the layout, and
> connected it to a function with the "expose_event" signal, and that
> function does the actual drawing. That method slows things down
> though, quite a bit when there are many things to be drawn. 
> 

Nope, there's no point in doing that. ;-)

Havoc





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