Re: GnomeCanvas updating
- From: Jon Trowbridge <trow emccta com>
- To: gnome-devel-list gnome org
- Cc: Kent Schumacher <kschumacher uswest net>
- Subject: Re: GnomeCanvas updating
- Date: Sat, 27 May 2000 10:57:28 -0500
On Sat, May 27, 2000 at 09:51:39AM -0500, Kent Schumacher wrote:
> I've written quite an extensive application using the GnomeCanvas, and
> everything works as expected except for one thing:
>
> To get anything to display, I need to explictly force a canvas update,
> either by covering and exposing the canvas with another window, or by calling
> gnome_canvas_request_redraw.
>
> I'm 99% sure I shouldn't have to do this - I've looked at the
> canvas-arrowhead.c source in the gnome-canvas test application, and
> I don't see any forced redraws.
You need to force a redraw at the end of your update routine. Most of
the stock canvas items accomplish this not by calling
gnome_canvas_request_redraw() directly, but by calling
gnome_canvas_update_bbox(), which itself contains a call to
_request_redraw().
You might have (quite logically) thought "My bounding box hasn't
changed, so I don't need to call _update_bbox()", and thus omitted it.
Which is fine, but you need to put in something else that forces the
redraw.
-JT
--
GNU/Linux: Free your mind and your OS will follow.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]