ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem solve.

The main issue here is mixing GTK2.0 and GTK3.0, a few changes had to be made on this code.

1º Here we read "draw" we must have "expose-event"

2º the arguments of do_drawing not have cairo_t *cr but GdKEventExpose *event

3º create in the do_drawing the next 2 lines:

cairo_t *cr; cr = gdk_cairo_create(widget->window);

These solved the entire problem.

Thanks.

click to hide/show revision 2
No.2 Revision

Problem solve.

The main issue here is mixing GTK2.0 and GTK3.0, a few changes had to be made on this code.

1º Here we read "draw" we must have "expose-event"

2º the arguments of do_drawing not have cairo_t *cr but GdKEventExpose *event

3º create in the do_drawing the next 2 lines:

cairo_t *cr;
cr = gdk_cairo_create(widget->window);

gdk_cairo_create(widget->window);

These solved the entire problem.

Thanks.