[cairo-commit] goocanvas/demo demo.c,1.16,1.17

Damon Chaplin commit at pdx.freedesktop.org
Tue Feb 20 06:22:09 PST 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/demo
In directory kemper:/tmp/cvs-serv11348/demo

Modified Files:
	demo.c 
Log Message:
2007-02-20  Damon Chaplin  <damon at gnome.org>

	* src/goocanvastext.c (goo_canvas_text_create_layout): 
	(goo_canvas_text_get_item_at): use the ink rect as well as the logical
	rect when calculating the bounds or doing hit-testing.

	* src/goocanvastable.c (goo_canvas_table_size_allocate_pass1): shrink
	homogeneous tables if appropriate.

	* src/goocanvaswidget.c (goo_canvas_widget_get_item_at): return the
	widget item if the point is within its bounds.

	* src/goocanvas.c (goo_canvas_render): if bounds are passed in set
	the clip path to the bounds.

	* demo/demo.c (write_pdf_clicked): added code to test clipped painting.



Index: demo.c
===================================================================
RCS file: /cvs/cairo/goocanvas/demo/demo.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- demo.c	19 Feb 2007 11:43:36 -0000	1.16
+++ demo.c	20 Feb 2007 14:22:03 -0000	1.17
@@ -39,6 +39,7 @@
 write_pdf_clicked (GtkWidget *button, GooCanvas *canvas)
 {
   cairo_surface_t *surface;
+  GooCanvasBounds bounds;
   cairo_t *cr;
 
   g_print ("In write_pdf_clicked\n");
@@ -49,7 +50,16 @@
   /* Place it in the middle of our 9x10 page. */
   cairo_translate (cr, 20, 130);
 
+  bounds.x1 = 100;
+  bounds.y1 = 100;
+  bounds.x2 = 300;
+  bounds.y2 = 300;
+
+#if 1
   goo_canvas_render (canvas, cr, NULL, 1.0);
+#else
+  goo_canvas_render (canvas, cr, &bounds, 1.0);
+#endif
 
   cairo_show_page (cr);
 



More information about the cairo-commit mailing list