[cairo-commit] cairo-demo/gtkcairo_slide ChangeLog, 1.4, 1.5 cairo_custom.c, 1.3, 1.4 cairo_custom.h, 1.3, 1.4 puzzle.c, 1.3, 1.4

OEyvind Kolaas commit at pdx.freedesktop.org
Thu May 13 14:47:16 PDT 2004


Committed by: pippin

Update of /cvs/cairo/cairo-demo/gtkcairo_slide
In directory pdx:/tmp/cvs-serv25663

Modified Files:
	ChangeLog cairo_custom.c cairo_custom.h puzzle.c 
Log Message:
removed gdk_cairo_set_color, replaced with gtk_cairo_set_gdk_color from GtkCairo


Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/ChangeLog	11 May 2004 14:50:15 -0000	1.4
--- b/ChangeLog	13 May 2004 21:47:14 -0000	1.5
***************
*** 1,2 ****
--- 1,6 ----
+ 2004-05-13 OEyvind Kolaas <pippin at freedesktop.org>
+ 	* *.[ch] : removed gdk_cairo_set_color, replaced with
+     gtk_cairo_set_gdk_color from GtkCairo
+ 
  2004-05-11 OEyvind Kolaas <pippin at freedesktop.org>
  	* *.[ch] : replacing ct with cr

Index: cairo_custom.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/cairo_custom.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** a/cairo_custom.c	11 May 2004 14:50:15 -0000	1.3
--- b/cairo_custom.c	13 May 2004 21:47:14 -0000	1.4
***************
*** 67,81 ****
      }
  }
- 
- void
- gdk_cairo_set_color (cairo_t *cr,
-                      GdkColor *color)
- {
-     double red, green, blue;
- 
-     red   = color->red   / 65535.0;
-     green = color->green / 65535.0;
-     blue  = color->blue  / 65535.0;
- 
-     cairo_set_rgb_color (cr, red, green, blue);
- }
--- 67,68 ----

Index: cairo_custom.h
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/cairo_custom.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** a/cairo_custom.h	11 May 2004 14:50:15 -0000	1.3
--- b/cairo_custom.h	13 May 2004 21:47:14 -0000	1.4
***************
*** 4,11 ****
  
  void
- gdk_cairo_set_color (cairo_t  *cr,
-                      GdkColor *color);
- 
- void
  cairo_rectangle_round ( cairo_t * cr,
                          double x0,
--- 4,7 ----

Index: puzzle.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/gtkcairo_slide/puzzle.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** a/puzzle.c	11 May 2004 14:50:15 -0000	1.3
--- b/puzzle.c	13 May 2004 21:47:14 -0000	1.4
***************
*** 575,585 ****
                 if (item_no==puzzle->grabbed) {
  
!                   gdk_cairo_set_color (cr, &style->dark[GTK_STATE_NORMAL]);
  
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gdk_cairo_set_color (cr, &style->dark[GTK_STATE_NORMAL]);
                    } else {
!                       gdk_cairo_set_color (cr, &style->dark[GTK_STATE_ACTIVE]);
                    }
                 }
--- 575,585 ----
                 if (item_no==puzzle->grabbed) {
  
!                   gtk_cairo_set_gdk_color (cr, &style->dark[GTK_STATE_NORMAL]);
  
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gtk_cairo_set_gdk_color (cr, &style->dark[GTK_STATE_NORMAL]);
                    } else {
!                       gtk_cairo_set_gdk_color (cr, &style->dark[GTK_STATE_ACTIVE]);
                    }
                 }
***************
*** 590,599 ****
                 cairo_save (cr);
                    if (item_no==puzzle->grabbed) {
!                      gdk_cairo_set_color (cr, &style->base[GTK_STATE_SELECTED]);
                    } else {
                       if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                          gdk_cairo_set_color (cr, &style->base[GTK_STATE_NORMAL]);
                       } else {
!                          gdk_cairo_set_color (cr, &style->base[GTK_STATE_NORMAL]);
                       }
                    }
--- 590,599 ----
                 cairo_save (cr);
                    if (item_no==puzzle->grabbed) {
!                      gtk_cairo_set_gdk_color (cr, &style->base[GTK_STATE_SELECTED]);
                    } else {
                       if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                          gtk_cairo_set_gdk_color (cr, &style->base[GTK_STATE_NORMAL]);
                       } else {
!                          gtk_cairo_set_gdk_color (cr, &style->base[GTK_STATE_NORMAL]);
                       }
                    }
***************
*** 601,610 ****
                 cairo_restore (cr);
                 if (item_no==puzzle->grabbed) {
!                  gdk_cairo_set_color (cr, &style->mid[GTK_STATE_SELECTED]);
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gdk_cairo_set_color (cr, &style->mid[GTK_STATE_NORMAL]);
                    } else {
!                       gdk_cairo_set_color (cr, &style->dark[GTK_STATE_ACTIVE]);
                    }
                 }
--- 601,610 ----
                 cairo_restore (cr);
                 if (item_no==puzzle->grabbed) {
!                  gtk_cairo_set_gdk_color (cr, &style->mid[GTK_STATE_SELECTED]);
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gtk_cairo_set_gdk_color (cr, &style->mid[GTK_STATE_NORMAL]);
                    } else {
!                       gtk_cairo_set_gdk_color (cr, &style->dark[GTK_STATE_ACTIVE]);
                    }
                 }
***************
*** 622,631 ****
                  }
                 if (item_no==puzzle->grabbed) {
!                   gdk_cairo_set_color (cr, &style->text[GTK_STATE_SELECTED]);
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gdk_cairo_set_color (cr, &style->text[GTK_STATE_NORMAL]);
                    } else {
!                       gdk_cairo_set_color (cr, &style->text[GTK_STATE_NORMAL]);
                    }
                 }
--- 622,631 ----
                  }
                 if (item_no==puzzle->grabbed) {
!                   gtk_cairo_set_gdk_color (cr, &style->text[GTK_STATE_SELECTED]);
                 } else {
                    if ( fabs(floor(item->x)-item->x)<0.01 && fabs(floor(item->y)-item->y)<0.01) {
!                       gtk_cairo_set_gdk_color (cr, &style->text[GTK_STATE_NORMAL]);
                    } else {
!                       gtk_cairo_set_gdk_color (cr, &style->text[GTK_STATE_NORMAL]);
                    }
                 }





More information about the cairo-commit mailing list