Re: aa version of the canvas problem



On Wed, 2 Jun 1999, Bertrand Guiheneuf wrote:

> Hi,
> 
> the followin code does not work. In theory, you should be able to create
> a new window with menu "Fichier/Nouveau" and then each mouse click in
> the window should display a ellipse item. This works well with non aa
> canvas, but not with aa. new items show only when, for example, I resize
> the window, or I if i hide then show it. See following code. 
> 
> Oh, there is a also a bug in test-gnome with aa canvas version. Move the 
> green text and you'll see by yourself.
> 
> Best regards,
> 
> 	Bertrand.
<snip>
>
>   /* ajouter une ellipse au cannevas */
>   ellipse = gnome_canvas_item_new 
>     (root_group, 
>      gnome_canvas_ellipse_get_type(),
>      "x1", x,
>      "x2", x + 100 * (double)rand()/RAND_MAX,
>      "y1", y,
>      "y2", y + 100 * (double)rand()/RAND_MAX,
>      "outline_color", "black",
>      "fill_color", NULL,
>      "width_units", 2.0,
>      NULL);
<snip>

Maybe you want to call
gnome_canvas_item_request_update( ellipse);
 to request a redraw.

But it's strange. It should start visible. I use an aa-canvas and do not
need to request an update.

Which version of gnome-libs are you using?

 Cheers, Martin.

          __ ___ *                       _  _
  |\/| /\ |_) |  ||\ |  |_| /\\    /|  |(_`|  |_|
  |  |/--\| \ |  || \|  | |/--\\/\/ |_ |._)|_ | |
      mailto:hawlisch@roxi.rz.fh-mannheim.de
     http://freddy.rz.fh-mannheim.de/~hawlisch



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