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

Cairo clearing problem.



Hi all!

Well, I'm having a problem with clearing a line.

---
	cairo_t *cr;
	cr = gdk_cairo_create (widget->window);
	
	cairo_set_source_rgba (cr, 0, 0, 0, 1);

	static const double dashed[] = { 3.0 };
	cairo_set_line_width (cr, 1.5);
	cairo_set_dash (cr, dashed, 1, 0);
	
	cairo_move_to (cr, RECTANGLE_GAP, RECTANGLE_GAP);
	cairo_rel_line_to (cr, width - (RECTANGLE_GAP * 2), 0);
	cairo_rel_line_to (cr, 0, height - (RECTANGLE_GAP * 2));
	cairo_rel_line_to (cr, -(width - (RECTANGLE_GAP * 2)), 0);
	cairo_close_path (cr);
	cairo_stroke (cr);
	
	cairo_destroy (cr);
---

It intends to set a dotted rectangle around the
border of a GtkVBox. Then, it must be erased
without affecting the inner widgets.

I thought that having the current path
it could be used after to clear just that drawn
in this path. Is there a way to do it?

I've used gdk_window_clear (), but child widgets
in the box are cleared also, which is undesired
of course.

Any suggestion ?

Thanks in advance...

Carlos Savoretti.




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