[cairo-commit] cairo-gtk-engine/src cge-draw.c,1.15,1.16 cge-style.c,1.5,1.6

Julien Boulnois commit at pdx.freedesktop.org
Mon Aug 15 11:12:59 PDT 2005


Committed by: jboulnois

Update of /cvs/cairo/cairo-gtk-engine/src
In directory pdx:/tmp/cvs-serv25782/src

Modified Files:
	cge-draw.c cge-style.c 
Log Message:
- comment set_background because of mem problem
- fix cairo-industrial


Index: cge-draw.c
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/cge-draw.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** a/cge-draw.c	14 Feb 2004 14:05:05 -0000	1.15
--- b/cge-draw.c	13 Mar 2004 14:40:08 -0000	1.16
***************
*** 458,465 ****
    gint i;
  
!   sur=cairo_surface_create_similar(cairo_current_target_surface(xrs),
! 				   CAIRO_FORMAT_ARGB32,
! 				   ncols,ncols);
  
    cairo_save(xrs);
    cairo_set_target_surface(xrs,sur);
--- 458,467 ----
    gint i;
  
!   //  sur=cairo_surface_create_similar(cairo_current_target_surface(xrs),
!   //				   CAIRO_FORMAT_ARGB32,
!   //				   ncols,ncols);
  
+   sur=cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
+ 				   ncols,ncols);
    cairo_save(xrs);
    cairo_set_target_surface(xrs,sur);
***************
*** 491,496 ****
   
    matrix=cairo_matrix_create();
!   cairo_matrix_scale(matrix,(double)(ncols-1)/width,(double)(ncols-1)/height);
!   cairo_surface_set_matrix(sur,matrix);
    cairo_surface_set_filter(sur, CAIRO_FILTER_BILINEAR);
    cairo_matrix_destroy(matrix);
--- 493,499 ----
   
    matrix=cairo_matrix_create();
!     cairo_matrix_scale(matrix,(double)(ncols-1)/width,(double)(ncols-1)/height);
!     cairo_surface_set_matrix(sur,matrix);
! 
    cairo_surface_set_filter(sur, CAIRO_FILTER_BILINEAR);
    cairo_matrix_destroy(matrix);
***************
*** 1045,1051 ****
    cstyle=cge_get_style(style,detail);
  
    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) {
--- 1048,1055 ----
    cstyle=cge_get_style(style,detail);
  
+   //printf("cge-draw:%i\n",cstyle->fill_style.gradient_colors_count[state_type]);
+ 
    colors = g_new0(GdkColor, cstyle->fill_style.gradient_colors_count[state_type]);
  
  
    if(cstyle->fill_style.fill_mode==CGE_FILL_SOLID) {
***************
*** 1083,1086 ****
--- 1087,1091 ----
    if(cstyle->fill_style.fill_mode==CGE_FILL_GRADIENT)
      {
+ 
      gradient=cge_create_gradient(xrs,
  				 cstyle->fill_style.gradient_colors_count[state_type],
***************
*** 2244,2248 ****
     gdk_window_set_back_pixmap(window,pm,FALSE);  
  
!  
  
   cairo_destroy(xrs);
--- 2249,2253 ----
     gdk_window_set_back_pixmap(window,pm,FALSE);  
  
! //   g_free(pm); 
  
   cairo_destroy(xrs);
***************
*** 2310,2313 ****
    //style_class->draw_layout = draw_layout;   
    
!   style_class->set_background=set_background;
  }
--- 2315,2318 ----
    //style_class->draw_layout = draw_layout;   
    
!   //style_class->set_background=set_background;
  }

Index: cge-style.c
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/cge-style.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** a/cge-style.c	5 Aug 2003 12:54:45 -0000	1.5
--- b/cge-style.c	13 Mar 2004 14:40:08 -0000	1.6
***************
*** 262,268 ****
  	token = gtk_rc_parse_color (scanner, &color[state]);
  	
  	retval->gradient_colors[state][colors_count[state]]=color[state];
! 	colors_count[state]++;
        }
        break;
        
--- 262,271 ----
  	token = gtk_rc_parse_color (scanner, &color[state]);
  	
+ 
  	retval->gradient_colors[state][colors_count[state]]=color[state];
! 	colors_count[state]++;	
! 	
        }
+ 
        break;
        
***************
*** 295,298 ****
--- 298,302 ----
  	}
      }
+ 
    return token;
  }





More information about the cairo-commit mailing list