Hi,
This seems to be a bug in openSUSE 10.3. This does not happen under
Ubuntu 7.10 and Fedora 8 Test 3. (All of these three distros have
libgnomecanvasmm 2.20.0.)
Sorry for the noise.
regards,
Akos
On Sat, 2007-10-20 at 17:55 +0200, Ladanyi, Akos wrote:
> Hi,
>
> I modified the 'examples/canvas/canvas.cc' file included in the
> libgnomecanvasmm-2.20.0 tarball so that it draws a red circle when I
> click on the canvas. This is what I did:
>
> 33a34
> > bool OnEvent(GdkEvent* e);
> 75a77,96
> >
> > signal_event().connect(sigc::mem_fun(*this,
> &CanvasExample::OnEvent));
> > }
> >
> > bool CanvasExample::OnEvent(GdkEvent* event)
> > {
> > switch (event->type)
> > {
> > case GDK_BUTTON_PRESS:
> > if (event->button.button == 1)
> > {
> > double x, y;
> > window_to_world(event->button.x, event->button.y, x, y);
> > using Gnome::Canvas::Ellipse;
> > Ellipse* ellipse = Gtk::manage(new Ellipse(m_canvasgroup,
> > x-10.0, y-10.0, x+10.0, y+10.0));
> > *ellipse << Gnome::Canvas::Properties::fill_color("red");
> > }
> > }
> > return false;
>
> My problem is that the red circles do not appear until the window is
> resized. What's wrong with this code?
>
> regards,
> Akos Ladanyi
>
> PS: Attached the modified canvas.cc.
> _______________________________________________
> gtkmm-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list