[cairo-commit] goocanvas TODO,,1.2

Damon Chaplin commit at pdx.freedesktop.org
Wed Mar 22 15:49:46 PST 2006

Committed by: damon

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

Modified Files:
Log Message:
2006-03-22  Damon Chaplin  <damon at gnome.org>

	* src/goocanvasview.[hc]: convert to a subclass of GtkContainer rather
	than GtkLayout, since the layout code didn't help much and just added
	to the confusion. (Getting scrolling/zooming to work smoothly  is
	pretty difficult.)

	Added a goo_canvas_view_scroll_to() function to scroll to a desired
	Added an anchor setting to specify where to place the contents of the
	canvas if it is smaller than the allocated widget area. (Like the
	"center_scroll_region" setting in GnomeCanvas but a bit more general.)

	Mapped a temporary window above the canvas when zooming in/out to
	stop X from scrolling the canvas contents before it is redrawn.
	(Idea pinched from FooCanvas.) Though this could possibly cause
	problems with keyboard input in future, in which case I think we should
	drop the fancy window scrolling stuff and just scroll ourselves.

	Added an internal freeze_count like GtkLayout used to have. This is
	used while reconfiguring the scrollbars etc. so we don't scroll more
	than once (e.g. horizontally then vertically).

	Added coordinate conversion functions to convert between device units
	and canvas item units or pixels.

	* src/goocanvastextview.[hc]: create a cairo_font_options_t object in
	the class init function and use it for all created PangoLayouts.
	This ensures that text is layed out the same at any scale, which
	also avoids the problems with items not being redrawn properly
	(since the bounds were slightly wrong). Note that I was using
	cairo_set_font_options(cr) before, but that isn't picked up by Pango
	so didn't work. (Font options seem to be associated with surfaces and
	also with the graphics state which is confusing.)

Index: TODO
RCS file: /cvs/cairo/goocanvas/TODO,v
retrieving revision
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- TODO	15 Dec 2005 15:32:00 -0000
+++ TODO	22 Mar 2006 23:49:44 -0000	1.2
@@ -2,12 +2,13 @@
 Features definitely needed:
  o Item visibility setting, combined with zoom level setting.
- o set_center_scroll_region() - keep the same point in the middle when zooming.
- o scroll_to() function.
- o Coordinate conversion helper functions (& use them in goocanvasview.c).
+ o Function to render part/all of canvas to any cairo_t.
+ o get_bounds() should ensure item is updated. Check other functions as well.
  o Sticky items that don't move at all as the canvas is scrolled & zoomed.
  o GooCanvasPath item, as in SVG.
  o Editable text item, with the layout remaining the same at all zoom levels.
  o Accessibility - hopefully the GnomeCanvas/FooCanvas code can be reused.
  o Keyboard focus navigation.
@@ -21,5 +22,6 @@
  o Clip paths/masks for items.
  o Filters like in SVG, to add graphical effects.
  o Support using the same item in different places, like SVG 'use'.
+ o Support using system color names, like SVG, e.g. "ActiveBorder".
+   This helps you write widget-like items that fit in with the rest of GTK+.

More information about the cairo-commit mailing list