goocanvas r41 - in trunk: . docs src



Author: damon
Date: Sun Mar 15 14:37:57 2009
New Revision: 41
URL: http://svn.gnome.org/viewvc/goocanvas?rev=41&view=rev

Log:

2009-03-15  Damon Chaplin  <damon gnome org>

	    * docs/coordinates.xml: 
	    * docs/architecture.xml: 
	    * docs/creating-items.xml: 
	    * src/goocanvasitemsimple.c: use the terms "canvas coordinate space" or
	    "canvas space" rather than "device space" which is a bit misleading.

	    * src/goocanvasitem.c: clarify the docs for the mouse position fields
	    of the event structs of the signals.



Modified:
   trunk/ChangeLog
   trunk/docs/architecture.xml
   trunk/docs/coordinates.xml
   trunk/docs/creating-items.xml
   trunk/src/goocanvasitem.c
   trunk/src/goocanvasitemsimple.c

Modified: trunk/docs/architecture.xml
==============================================================================
--- trunk/docs/architecture.xml	(original)
+++ trunk/docs/architecture.xml	Sun Mar 15 14:37:57 2009
@@ -47,7 +47,7 @@
 	Each item in the canvas keeps a #GooCanvasBounds structure which
 	stores the bounding rectangle of the item and all of its descendants.
 	This makes it easy to find out which items in the canvas need repainting
-	or which item the mouse is over. (The bounds are stored in the device
+	or which item the mouse is over. (The bounds are stored in the canvas
 	coordinate space, which is the coordinate space of the entire canvas,
 	after any item transformation matrices have been applied.)
       </para>

Modified: trunk/docs/coordinates.xml
==============================================================================
--- trunk/docs/coordinates.xml	(original)
+++ trunk/docs/coordinates.xml	Sun Mar 15 14:37:57 2009
@@ -44,17 +44,18 @@
       #GooCanvasRect:x and #GooCanvasRect:y properties of a #GooCanvasRect
       are specified)
       is referred to as "Item Space". The coordinate space used by
-      the entire canvas is referred to as "Device Space". "Item Space"
-      and "Device Space" may or may not be the same, depending on whether
+      the entire canvas is referred to as "Canvas Space" (or "Device Space").
+      "Item Space" and "Canvas Space" may or may not be the same, depending
+      on whether
       the item or any of its ancestors have a transformation matrix set.
       (Note that the entire canvas may also be scrolled and/or zoomed,
       which means that there may be additional transformations above
-      "Device Space".)
+      "Canvas Space".)
     </para>
     <para>
       Functions are provided to convert between coordinate spaces,
       e.g. goo_canvas_convert_to_item_space() and
-      goo_canvas_convert_from_item_space() convert device space coordinates
+      goo_canvas_convert_from_item_space() convert canvas space coordinates
       to item space and vice versa.
     </para>
 

Modified: trunk/docs/creating-items.xml
==============================================================================
--- trunk/docs/creating-items.xml	(original)
+++ trunk/docs/creating-items.xml	Sun Mar 15 14:37:57 2009
@@ -187,14 +187,14 @@
 	      set_parent() - the item's parent should be stored (though it
 	      should not add a reference to the parent).
 	  </para></listitem><listitem><para>
-	      get_bounds() - returns the bounds of the item, in device space.
+	      get_bounds() - returns the bounds of the item, in canvas space.
 	      The item should ensure that the bounds are up-to-date before
 	      returning them, calling goo_canvas_item_ensure_updated() if
 	      necessary.
 	  </para></listitem><listitem><para>
 	      update() - if the item has been changed since the last update,
 	      or if the entire_tree flag is %TRUE, the item's bounds should
-	      be recomputed (in device space). It should also request a redraw
+	      be recomputed (in canvas space). It should also request a redraw
 	      of the old bounds and the new bounds, so the display is updated
 	      appropriately. The new bounds should be returned in the bounds
 	      argument.

Modified: trunk/src/goocanvasitem.c
==============================================================================
--- trunk/src/goocanvasitem.c	(original)
+++ trunk/src/goocanvasitem.c	Sun Mar 15 14:37:57 2009
@@ -119,8 +119,9 @@
        * GooCanvasItem::enter-notify-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when the mouse enters an item.
        *
@@ -143,8 +144,9 @@
        * GooCanvasItem::leave-notify-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when the mouse leaves an item.
        *
@@ -167,8 +169,9 @@
        * GooCanvasItem::motion-notify-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when the mouse moves within an item.
        *
@@ -191,8 +194,9 @@
        * GooCanvasItem::button-press-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when a mouse button is pressed in an item.
        *
@@ -215,8 +219,9 @@
        * GooCanvasItem::button-release-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when a mouse button is released in an item.
        *
@@ -396,8 +401,9 @@
        * GooCanvasItem::scroll-event
        * @item: the item that received the signal.
        * @target_item: the target of the event.
-       * @event: the event data, with coordinates translated to canvas
-       *  coordinates.
+       * @event: the event data. The x & y fields contain the mouse position
+       *  in the item's coordinate space. The root_x & root_y fields contain
+       *  the same coordinates converted to the canvas coordinate space.
        *
        * Emitted when a button in the 4 to 7 range is pressed. Wheel mice are
        * usually configured to generate button press events for buttons 4 and 5

Modified: trunk/src/goocanvasitemsimple.c
==============================================================================
--- trunk/src/goocanvasitemsimple.c	(original)
+++ trunk/src/goocanvasitemsimple.c	Sun Mar 15 14:37:57 2009
@@ -1638,7 +1638,8 @@
  * This function is intended to be used by subclasses of #GooCanvasItemSimple,
  * typically in their update() or get_requested_area() methods.
  *
- * It converts the item's bounds to a bounding box in device space.
+ * It converts the item's bounds to a bounding box in the canvas (device)
+ * coordinate space.
  **/
 void
 goo_canvas_item_simple_user_bounds_to_device (GooCanvasItemSimple *item,



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