[Commit] cairo-gtk-engine/src cge-draw.c,1.12,1.13

Julien Boulnois commit at keithp.com
Sat Sep 13 05:01:25 PDT 2003


Committed by: jboulnois

Update of /local/src/CVS/cairo-gtk-engine/src
In directory home.keithp.com:/tmp/cvs-serv23488/src

Modified Files:
	cge-draw.c 
Log Message:
commit Jaka Mocnik patch


Index: cge-draw.c
===================================================================
RCS file: /local/src/CVS/cairo-gtk-engine/src/cge-draw.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cge-draw.c	4 Sep 2003 15:16:26 -0000	1.12
+++ cge-draw.c	13 Sep 2003 11:01:22 -0000	1.13
@@ -551,12 +551,11 @@
 			   gdouble line_width, 
 			   GtkArrowType at)
 {
-  gdouble r,g,b;
+  gdouble r,g,b, rt;
   cairo_save(xrs);
   cairo_new_path(xrs);
   cairo_set_line_width(xrs, line_width);
   cairo_set_line_join (xrs, CAIRO_LINE_JOIN_ROUND);
-  gdouble rt;
 
   switch(THEME_DATA(style)->arrow_style)
     {      
@@ -1032,16 +1031,19 @@
 						gint height)
 {
   cairo_surface_t *gradient;
+  GdkColor *colors;
   gint i;
   cge_style *cstyle;
   cstyle=cge_get_style(style,detail);
-  GdkColor colors[cstyle->fill_style.gradient_colors_count[state_type]];
 
+  colors = g_new0(GdkColor, cstyle->fill_style.gradient_colors_count[state_type]);
 
   //printf("gradient detail: %s\n",detail);
 
-  if(cstyle->fill_style.fill_mode==CGE_FILL_SOLID)
+  if(cstyle->fill_style.fill_mode==CGE_FILL_SOLID) {
+    g_free(colors);
     return NULL;
+  }
   
   if(cstyle->fill_style.gradient_colors_default[state_type]==TRUE)
     {
@@ -1077,7 +1079,7 @@
 				 cstyle->fill_style.alpha,
 				 cstyle->fill_style.gradient_direction,
 				 x_off,y_off,width,height);
-  
+  g_free(colors);
   return gradient;
 }
 




More information about the Commit mailing list