[cairo-commit] goocanvas/src goocanvastext.c, 1.21, 1.22 goocanvastext.h, 1.10, 1.11

Damon Chaplin commit at pdx.freedesktop.org
Mon Feb 25 06:34:08 PST 2008


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv14008/src

Modified Files:
	goocanvastext.c goocanvastext.h 
Log Message:
removed goo_canvas_text_model_get_natural_extents()


Index: goocanvastext.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvastext.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- goocanvastext.c	25 Feb 2008 14:12:25 -0000	1.21
+++ goocanvastext.c	25 Feb 2008 14:35:03 -0000	1.22
@@ -731,10 +731,14 @@
 				     PangoRectangle *ink_rect,
 				     PangoRectangle *logical_rect)
 {
+  GooCanvasItem *item = (GooCanvasItem*) text;
   GooCanvasItemSimple *simple = (GooCanvasItemSimple*) text;
   PangoLayout *layout;
   cairo_t *cr;
 
+  if (simple->need_update)
+    goo_canvas_item_ensure_updated (item);
+
   cr = goo_canvas_create_cairo_context (simple->canvas);
   layout = goo_canvas_text_create_layout (simple->simple_data, text->text_data,
 					  text->text_data->width, cr, NULL,
@@ -981,37 +985,6 @@
 }
 
 
-/**
- * goo_canvas_text_model_get_natural_extents:
- * @tmodel: a #GooCanvasTextModel.
- * @ink_rect: the location to return the ink rect, or %NULL.
- * @logical_rect: the location to return the logical rect, or %NULL.
- * 
- * Gets the natural extents of the text, in the text item's coordinate space.
- *
- * The final extents of the text may be different, if the text item is placed
- * in a layout container such as #GooCanvasTable.
- **/
-void
-goo_canvas_text_model_get_natural_extents (GooCanvasTextModel  *tmodel,
-					   PangoRectangle      *ink_rect,
-					   PangoRectangle      *logical_rect)
-{
-  GooCanvasItemModelSimple *smodel = (GooCanvasItemModelSimple*) tmodel;
-  PangoLayout *layout;
-  cairo_t *cr;
-
-  cr = goo_canvas_create_cairo_context (NULL);
-  layout = goo_canvas_text_create_layout (&smodel->simple_data,
-					  &tmodel->text_data,
-					  tmodel->text_data.width,
-					  cr, NULL, NULL, NULL);
-  pango_layout_get_extents (layout, ink_rect, logical_rect);
-  g_object_unref (layout);
-  cairo_destroy (cr);
-}
-
-
 static void
 item_model_interface_init (GooCanvasItemModelIface *iface)
 {

Index: goocanvastext.h
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvastext.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- goocanvastext.h	25 Feb 2008 14:12:25 -0000	1.10
+++ goocanvastext.h	25 Feb 2008 14:35:03 -0000	1.11
@@ -127,10 +127,6 @@
 					       GtkAnchorType       anchor,
 					       ...);
 
-void	goo_canvas_text_model_get_natural_extents (GooCanvasTextModel  *tmodel,
-						   PangoRectangle      *ink_rect,
-						   PangoRectangle      *logical_rect);
-
 
 G_END_DECLS
 



More information about the cairo-commit mailing list