[cairo-commit] goocanvas ChangeLog,1.92,1.93 README,1.8,1.9

Damon Chaplin commit at pdx.freedesktop.org
Tue Mar 6 04:08:22 PST 2007


Committed by: damon

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

Modified Files:
	ChangeLog README 
Log Message:
2007-03-06  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasitem.[hc]: added get_requested_height() method.

	* src/goocanvastable.c: Reworked a lot of code to support
	width-for-height layout. This gets the requested area of all children,
	calculates the column widths, then checks if any children want to
	change their requested height given their allocated width. Text items
	change their requested height based on their width, so this results in
	a better layout.

	* src/goocanvastext.h (struct _GooCanvasText): added layout_width to
	store the width used for the PangoLayout. This initially comes from
	the text's width property, but can be modified when the text item
	is layed out in a container like GooCanvasTable.

	* src/goocanvastext.c (goo_canvas_text_get_requested_height):
	calculates the requested height for the given width, or just returns
	-1 if the text item is rotated or has a clip path, in which case the
	original height is used.
	(goo_canvas_text_init, goo_canvas_text_create_layout) 
	(goo_canvas_text_update): use layout_width.

	* demo/demo-table.c (create_width_for_height_table): added tests for
	width-for-height layout.

	* demo/demo-clipping.c (setup_canvas): added text item to check
	clipping works OK with them.



Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/goocanvas/ChangeLog,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- ChangeLog	27 Feb 2007 14:45:07 -0000	1.92
+++ ChangeLog	6 Mar 2007 12:08:14 -0000	1.93
@@ -1,3 +1,32 @@
+2007-03-06  Damon Chaplin  <damon at gnome.org>
+
+	* src/goocanvasitem.[hc]: added get_requested_height() method.
+
+	* src/goocanvastable.c: Reworked a lot of code to support
+	width-for-height layout. This gets the requested area of all children,
+	calculates the column widths, then checks if any children want to
+	change their requested height given their allocated width. Text items
+	change their requested height based on their width, so this results in
+	a better layout.
+
+	* src/goocanvastext.h (struct _GooCanvasText): added layout_width to
+	store the width used for the PangoLayout. This initially comes from
+	the text's width property, but can be modified when the text item
+	is layed out in a container like GooCanvasTable.
+
+	* src/goocanvastext.c (goo_canvas_text_get_requested_height):
+	calculates the requested height for the given width, or just returns
+	-1 if the text item is rotated or has a clip path, in which case the
+	original height is used.
+	(goo_canvas_text_init, goo_canvas_text_create_layout) 
+	(goo_canvas_text_update): use layout_width.
+
+	* demo/demo-table.c (create_width_for_height_table): added tests for
+	width-for-height layout.
+
+	* demo/demo-clipping.c (setup_canvas): added text item to check
+	clipping works OK with them.
+
 2007-02-27  Damon Chaplin  <damon at gnome.org>
 
 	* Released GooCanvas 0.7

Index: README
===================================================================
RCS file: /cvs/cairo/goocanvas/README,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- README	27 Feb 2007 14:45:07 -0000	1.8
+++ README	6 Mar 2007 12:08:15 -0000	1.9
@@ -28,6 +28,8 @@
  o Basic items - rect/ellipse/polyline/text/image/group.
  o Path item, using SVG path specification strings.
  o Table item for layout of other items (similar to the GtkTable widget).
+   (This also supports items whose requested height changes according to
+   their allocated width, such as text items.)
  o Embedded GTK+ widgets.
  o Layers/stacking order with raise/lower functions.
  o Cascading styles - line width/style/dashes, colors, fill patterns.



More information about the cairo-commit mailing list