[cairo-commit] cairo-gtk-engine/src cge-draw.c,1.14,1.15

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-serv9850/src

Modified Files:
	cge-draw.c 
Log Message:
bugfixes


Index: cge-draw.c
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/cge-draw.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cge-draw.c	13 Feb 2004 17:39:35 -0000	1.14
--- cge-draw.c	14 Feb 2004 14:05:05 -0000	1.15
***************
*** 681,689 ****
    cairo_save(xrs);
  
!   /*  x += line_width;
    y += line_width;
    w -= line_width*2;
    h -= line_width*2; 
!   */
    cairo_save(xrs);
    cairo_new_path(xrs);
--- 681,689 ----
    cairo_save(xrs);
  
!   x += line_width;
    y += line_width;
    w -= line_width*2;
    h -= line_width*2; 
!   
    cairo_save(xrs);
    cairo_new_path(xrs);
***************
*** 693,706 ****
    cairo_rel_line_to(xrs,  0,   -(double)h);
    cairo_rel_line_to(xrs,  (double)w,   0);
- 
    color_gdk_to_rgb(c2,&r,&g,&b);
    cairo_set_rgb_color(xrs, r, g, b);	
    cairo_set_alpha(xrs,alpha);
- 
-   /*
-   cairo_set_rgb_color(xrs, 0, 0, 0);	   
-   cairo_set_alpha(xrs,0.6);
-   */
- 
    cairo_stroke(xrs);  
    cairo_restore(xrs);
--- 693,699 ----
***************
*** 713,726 ****
    cairo_rel_line_to(xrs,  0,   -(double)h);
    cairo_rel_line_to(xrs,  (double)w,   0);
- 
    color_gdk_to_rgb(c1,&r,&g,&b);
    cairo_set_rgb_color(xrs, r, g, b);	
    cairo_set_alpha(xrs,alpha);
- 
-   /* 
-   cairo_set_rgb_color(xrs, 1, 1, 1);	   
-   cairo_set_alpha(xrs,0.6);
-   */
- 
    cairo_stroke(xrs);  
    cairo_restore(xrs);
--- 706,712 ----
***************
*** 733,749 ****
    cairo_rel_line_to(xrs,  (double)w,   0);
    cairo_rel_line_to(xrs,  0,   -(double)h);
- 
    color_gdk_to_rgb(c2,&r,&g,&b);
    cairo_set_rgb_color(xrs, r, g, b);	
    cairo_set_alpha(xrs,alpha);
! 
    /*
!   cairo_set_rgb_color(xrs, 0, 0, 0);	   
!   cairo_set_alpha(xrs,0.6);
!   */
    cairo_stroke(xrs);  
    cairo_restore(xrs);
! 
! 
    cairo_restore(xrs);
  }
--- 719,741 ----
    cairo_rel_line_to(xrs,  (double)w,   0);
    cairo_rel_line_to(xrs,  0,   -(double)h);
    color_gdk_to_rgb(c2,&r,&g,&b);
    cairo_set_rgb_color(xrs, r, g, b);	
    cairo_set_alpha(xrs,alpha);
!   cairo_stroke(xrs);  
!   cairo_restore(xrs);
    /*
!   cairo_save(xrs);
!   cairo_new_path(xrs);
!   cairo_set_line_width(xrs, line_width);  
!   cairo_translate(xrs,(double)x,(double)y);
!   cairo_move_to(xrs, line_width/2,(double)h+line_width/2);  
!   cairo_rel_line_to(xrs,  (double)w,   0);
!   cairo_rel_line_to(xrs,  0,   -(double)h);
!   color_gdk_to_rgb(c2,&r,&g,&b);
!   cairo_set_rgb_color(xrs, 0, 0, 0);	
!   cairo_set_alpha(xrs,alpha);
    cairo_stroke(xrs);  
    cairo_restore(xrs);
! */
    cairo_restore(xrs);
  }
***************
*** 1031,1035 ****
      cairo_set_pattern(xrs,pattern);
  
- 
    if(fill)
      cairo_fill(xrs);
--- 1023,1026 ----
***************
*** 1091,1094 ****
--- 1082,1086 ----
    
    if(cstyle->fill_style.fill_mode==CGE_FILL_GRADIENT)
+     {
      gradient=cge_create_gradient(xrs,
  				 cstyle->fill_style.gradient_colors_count[state_type],
***************
*** 1099,1102 ****
--- 1091,1097 ----
    g_free(colors);
    return gradient;
+     }
+ 
+   return NULL;
  }
  
***************
*** 1146,1159 ****
    else
      {
        if(cstyle->line_style.line_mode==CGE_LINE_BEVEL)
  	{
  	  cairo_save(xrs);
  	  cairo_translate(xrs,(double)x,(double)y);
  	  cairo_rectangle(xrs,0,0,(double)width,(double)height);
! 	  cairo_set_pattern(xrs,gradient);
  	  cairo_fill(xrs);
  	  cairo_restore(xrs);
  	}
!       else
  	{
  	  color=style->bg[state_type];
--- 1141,1171 ----
    else
      {
+       
        if(cstyle->line_style.line_mode==CGE_LINE_BEVEL)
  	{
+ 	  /*	  
  	  cairo_save(xrs);
  	  cairo_translate(xrs,(double)x,(double)y);
  	  cairo_rectangle(xrs,0,0,(double)width,(double)height);
! 	  if(gradient!=NULL)
! 	    cairo_set_pattern(xrs,gradient);
  	  cairo_fill(xrs);
  	  cairo_restore(xrs);
+ */	  
+ 	  color=style->bg[state_type];
+ 
+ 	  
+ 	  cge_draw_box(xrs,
+ 		       color,
+ 		       NULL,
+ 		       cstyle->fill_style.alpha,
+ 		       x,
+ 		       y,
+ 		       width,
+ 		       height,
+ 		       0,
+ 		       TRUE,0);
  	}
!       else	
  	{
  	  color=style->bg[state_type];





More information about the cairo-commit mailing list