goocanvas r18 - in trunk: . src



Author: damon
Date: Sun Oct 12 13:30:32 2008
New Revision: 18
URL: http://svn.gnome.org/viewvc/goocanvas?rev=18&view=rev

Log:

2008-10-12  Armin Burgmeier  <armin openismus com>

	    * src/goocanvastable.c (goo_canvas_table_get_requested_area)
	    (goo_canvas_table_allocate_area): Request redraw of the table's
	    bounds, as GooCanvasItemSimple does, to fix incorrect drawing when
	    changing the table's width or height.

	    (goo_canvas_table_paint): Keep clipping to the allocated size when
	    drawing the children, so they are not rendered outside the allocated
	    area when the table is shrunk. #555093



Modified:
   trunk/ChangeLog
   trunk/src/goocanvastable.c

Modified: trunk/src/goocanvastable.c
==============================================================================
--- trunk/src/goocanvastable.c	(original)
+++ trunk/src/goocanvastable.c	Sun Oct 12 13:30:32 2008
@@ -1933,6 +1933,9 @@
   GooCanvasTableDimensionLayoutData *rows, *columns;
   gdouble width = 0.0, height = 0.0;
   gint row, column, end;
+
+  /* Request a redraw of the existing bounds */
+  goo_canvas_request_redraw (simple->canvas, &simple->bounds);
   
   /* We reset the bounds to 0, just in case we are hidden or aren't allocated
      any area. */
@@ -2154,6 +2157,8 @@
   layout_data->children = NULL;
 
   cairo_restore (cr);
+
+  goo_canvas_request_redraw (simple->canvas, &simple->bounds);
 }
 
 
@@ -2250,10 +2255,6 @@
   frame_width = MAX (layout_data->allocated_size[HORZ], layout_data->natural_size[HORZ]);
   frame_height = MAX (layout_data->allocated_size[VERT], layout_data->natural_size[VERT]);
 
-  /* Save current line width, line cap etc. for drawing items after having
-     drawn grid lines */
-  cairo_save (cr);
-
   /* Draw border and grid lines */
   if (check_clip)
     {
@@ -2265,6 +2266,10 @@
       cairo_clip (cr);
     }
 
+  /* Save current line width, line cap etc. for drawing items after having
+     drawn grid lines */
+  cairo_save (cr);
+
   /* Fill the table, if desired. */
   if (goo_canvas_style_set_fill_options (style, cr))
     {



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