[cairo-commit] cairo/src cairo.h, 1.54, 1.55 cairo_ft_font.c, 1.21, 1.22 cairo_spline.c, 1.7, 1.8

Carl Worth commit at pdx.freedesktop.org
Fri May 7 18:52:04 PDT 2004


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv21649/src

Modified Files:
	cairo.h cairo_ft_font.c cairo_spline.c 
Log Message:

        * src/cairo_ft_font.c (_utf8_to_ucs4): Bail on NULL utf8 string.

        * src/cairo_spline.c (_cairo_spline_add_point): Don't add two
        consecutive, identical points when decomposing the spline, (which
        was leading to an infinte loop in the stroke algorithm when it
        found a slope of (0,0)).


Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** a/cairo.h	16 Apr 2004 15:33:20 -0000	1.54
--- b/cairo.h	8 May 2004 01:52:01 -0000	1.55
***************
*** 379,382 ****
--- 379,383 ----
  cairo_init_clip (cairo_t *cr);
  
+ /* Note: cairo_clip does not consume the current path */
  void
  cairo_clip (cairo_t *cr);

Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** a/cairo_ft_font.c	6 Apr 2004 16:36:12 -0000	1.21
--- b/cairo_ft_font.c	8 May 2004 01:52:02 -0000	1.22
***************
*** 242,246 ****
      FcChar32 u = 0;
  
!     if (ucs4 == NULL || nchars == NULL)
          return;
  
--- 242,246 ----
      FcChar32 u = 0;
  
!     if (utf8 == NULL || ucs4 == NULL || nchars == NULL)
          return;
  

Index: cairo_spline.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_spline.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** a/cairo_spline.c	23 Oct 2003 14:47:29 -0000	1.7
--- b/cairo_spline.c	8 May 2004 01:52:02 -0000	1.8
***************
*** 119,122 ****
--- 119,129 ----
  {
      cairo_status_t status;
+     cairo_point_t *prev;
+ 
+     if (spline->num_points) {
+ 	prev = &spline->points[spline->num_points - 1];
+ 	if (prev->x == point->x && prev->y == point->y)
+ 	    return CAIRO_STATUS_SUCCESS;
+     }
  
      if (spline->num_points >= spline->points_size) {





More information about the cairo-commit mailing list