[Commit] cairo/src cairo.c, 1.13, 1.14 cairo.h, 1.14, 1.15 cairo_gstate.c, 1.13, 1.14 cairo_path.c, 1.5, 1.6 cairoint.h, 1.18, 1.19

Carl Worth commit at keithp.com
Thu Sep 25 16:01:31 PDT 2003


Committed by: cworth

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

Modified Files:
	cairo.c cairo.h cairo_gstate.c cairo_path.c cairoint.h 
Log Message:
Removed support for cairo_path_t and related functions.
Bumped version to 0.1.5

Index: cairo.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cairo.c	25 Sep 2003 15:01:38 -0000	1.13
+++ cairo.c	25 Sep 2003 22:01:28 -0000	1.14
@@ -63,7 +63,7 @@
     *cr = *cr_other;
     cr->ref_count = 0;
 
-    cr->gstate = _cairo_gstate_copy (cr_other->gstate);
+    cr->gstate = _cairo_gstate_clone (cr_other->gstate);
     if (cr->gstate == NULL)
 	cr->status = CAIRO_STATUS_NO_MEMORY;
 
@@ -105,7 +105,7 @@
 	return;
 
     if (cr->gstate) {
-	top = _cairo_gstate_copy (cr->gstate);
+	top = _cairo_gstate_clone (cr->gstate);
     } else {
 	top = _cairo_gstate_create ();
     }
@@ -548,16 +548,6 @@
 slim_hidden_def(cairo_close_path);
 
 void
-cairo_set_path (cairo_t *cr, cairo_path_t *path)
-{
-    if (cr->status)
-	return;
-
-    cr->status = _cairo_gstate_set_path (cr->gstate, path);
-}
-slim_hidden_def(cairo_set_path);
-
-void
 cairo_stroke (cairo_t *cr)
 {
     if (cr->status)
@@ -734,12 +724,6 @@
 }
 DEPRECATE (cairo_get_target_surface, cairo_current_target_surface);
 
-cairo_path_t *
-cairo_current_path (cairo_t *cr)
-{
-    return _cairo_gstate_current_path (cr->gstate);
-}
-
 cairo_status_t
 cairo_status (cairo_t *cr)
 {

Index: cairo.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cairo.h	25 Sep 2003 15:01:38 -0000	1.14
+++ cairo.h	25 Sep 2003 22:01:28 -0000	1.15
@@ -39,9 +39,8 @@
 #endif
 
 typedef struct cairo cairo_t;
-typedef struct cairo_matrix cairo_matrix_t;
-typedef struct cairo_path cairo_path_t;
 typedef struct cairo_surface cairo_surface_t;
+typedef struct cairo_matrix cairo_matrix_t;
 
 #ifdef __cplusplus
 extern "C" {
@@ -293,9 +292,6 @@
 extern void __external_linkage
 cairo_close_path (cairo_t *cr);
 
-extern void __external_linkage
-cairo_set_path (cairo_t *cr, cairo_path_t *path);
-
 /* Painting functions */
 extern void __external_linkage
 cairo_stroke (cairo_t *cr);
@@ -391,9 +387,6 @@
 extern cairo_surface_t * __external_linkage
 cairo_current_target_surface (cairo_t *cr);
 
-extern cairo_path_t * __external_linkage
-cairo_current_path (cairo_t *cr);
-
 /* Error status queries */
 
 typedef enum cairo_status {
@@ -538,46 +531,6 @@
 extern cairo_status_t __external_linkage
 cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y);
 
-/* Path functions */
-
-extern cairo_path_t * __external_linkage
-cairo_path_create (void);
-
-extern void __external_linkage
-cairo_path_destroy (cairo_path_t *path);
-
-extern cairo_status_t __external_linkage
-cairo_path_move_to (cairo_path_t *path, double x, double y);
-
-extern cairo_status_t __external_linkage
-cairo_path_line_to (cairo_path_t *path, double x, double y);
-
-extern cairo_status_t __external_linkage
-cairo_path_curve_to (cairo_path_t *path,
-		     double x1, double y1,
-		     double x2, double y2,
-		     double x3, double y3);
-
-extern cairo_status_t __external_linkage
-cairo_path_rel_move_to (cairo_path_t *path,
-			double dx, double dy);
-
-extern cairo_status_t __external_linkage
-cairo_path_rel_line_to (cairo_path_t *path,
-			double dx, double dy);
-
-extern cairo_status_t __external_linkage
-cairo_path_rel_curve_to (cairo_path_t *path,
-			 double dx1, double dy1,
-			 double dx2, double dy2,
-			 double dx3, double dy3);
-
-extern cairo_status_t __external_linkage
-cairo_path_close_path (cairo_path_t *path);
-
-extern cairo_status_t __external_linkage
-cairo_path_current_point (cairo_path_t *path, double *x_ret, double *y_ret);
-
 /* Deprecated functions. We've made some effort to allow the
    deprecated functions to continue to work for now, (with useful
    warnings). But the deprecated functions will not appear in the next

Index: cairo_gstate.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_gstate.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cairo_gstate.c	25 Sep 2003 15:01:38 -0000	1.13
+++ cairo_gstate.c	25 Sep 2003 22:01:28 -0000	1.14
@@ -30,6 +30,9 @@
 
 #include "cairoint.h"
 
+static void
+_cairo_gstate_set_current_pt (cairo_gstate_t *gstate, double x, double y);
+
 static cairo_status_t
 _cairo_gstate_ensure_source (cairo_gstate_t *gstate);
 
@@ -90,6 +93,10 @@
 
     _cairo_path_init (&gstate->path);
 
+    gstate->current_pt.x = 0.0;
+    gstate->current_pt.y = 0.0;
+    gstate->has_current_pt = 0;
+
     _cairo_pen_init_empty (&gstate->pen_regular);
 
     gstate->next = NULL;
@@ -174,23 +181,23 @@
     free (gstate);
 }
 
-cairo_gstate_t *
-_cairo_gstate_copy (cairo_gstate_t *other)
+cairo_gstate_t*
+_cairo_gstate_clone (cairo_gstate_t *gstate)
 {
     cairo_status_t status;
-    cairo_gstate_t *gstate;
+    cairo_gstate_t *clone;
 
-    gstate = malloc (sizeof (cairo_gstate_t));
-    if (gstate) {
-	status = _cairo_gstate_init_copy (gstate, other);
+    clone = malloc (sizeof (cairo_gstate_t));
+    if (clone) {
+	status = _cairo_gstate_init_copy (clone, gstate);
 	if (status) {
-	    free (gstate);
+	    free (clone);
 	    return NULL;
 	}
     }
-    gstate->next = NULL;
+    clone->next = NULL;
 
-    return gstate;
+    return clone;
 }
 
 /* Push rendering off to an off-screen group. */
@@ -306,23 +313,6 @@
     return gstate->surface;
 }
 
-cairo_path_t *
-_cairo_gstate_current_path (cairo_gstate_t *gstate)
-{
-    cairo_path_t *path;
-
-    if (gstate == NULL)
-	return NULL;
-
-    path = _cairo_path_copy (&gstate->path);
-    if (path == NULL)
-	return NULL;
-
-    _cairo_path_set_ctm_inverse (path, &gstate->ctm_inverse);
-
-    return path;
-}
-
 cairo_status_t
 _cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_surface_t *pattern)
 {
@@ -647,10 +637,20 @@
     return CAIRO_STATUS_SUCCESS;
 }
 
+static void
+_cairo_gstate_set_current_pt (cairo_gstate_t *gstate, double x, double y)
+{
+    gstate->current_pt.x = x;
+    gstate->current_pt.y = y;
+
+    gstate->has_current_pt = 1;
+}
+
 cairo_status_t
 _cairo_gstate_new_path (cairo_gstate_t *gstate)
 {
     _cairo_path_fini (&gstate->path);
+    gstate->has_current_pt = 0;
 
     return CAIRO_STATUS_SUCCESS;
 }
@@ -662,11 +662,13 @@
 
     cairo_matrix_transform_point (&gstate->ctm, &x, &y);
 
-    status = cairo_path_move_to (&gstate->path, x, y);
-    if (status)
-	return status;
+    status = _cairo_path_move_to (&gstate->path, x, y);
 
-    return CAIRO_STATUS_SUCCESS;
+    _cairo_gstate_set_current_pt (gstate, x, y);
+
+    gstate->last_move_pt = gstate->current_pt;
+
+    return status;
 }
 
 cairo_status_t
@@ -676,11 +678,11 @@
 
     cairo_matrix_transform_point (&gstate->ctm, &x, &y);
 
-    status = cairo_path_line_to (&gstate->path, x, y);
-    if (status)
-	return status;
+    status = _cairo_path_line_to (&gstate->path, x, y);
 
-    return CAIRO_STATUS_SUCCESS;
+    _cairo_gstate_set_current_pt (gstate, x, y);
+
+    return status;
 }
 
 cairo_status_t
@@ -695,30 +697,52 @@
     cairo_matrix_transform_point (&gstate->ctm, &x2, &y2);
     cairo_matrix_transform_point (&gstate->ctm, &x3, &y3);
 
-    status = cairo_path_curve_to (&gstate->path,
-				  x1, y1,
-				  x2, y2,
-				  x3, y3);
-    if (status)
-	return status;
+    status = _cairo_path_curve_to (&gstate->path,
+				   x1, y1,
+				   x2, y2,
+				   x3, y3);
 
-    return CAIRO_STATUS_SUCCESS;
+    _cairo_gstate_set_current_pt (gstate, x3, y3);
+
+    return status;
 }
 
 cairo_status_t
 _cairo_gstate_rel_move_to (cairo_gstate_t *gstate, double dx, double dy)
 {
+    cairo_status_t status;
+    double x, y;
+
     cairo_matrix_transform_distance (&gstate->ctm, &dx, &dy);
 
-    return cairo_path_rel_move_to (&gstate->path, dx, dy);
+    x = gstate->current_pt.x + dx;
+    y = gstate->current_pt.y + dy;
+
+    status = _cairo_path_move_to (&gstate->path, x, y);
+
+    _cairo_gstate_set_current_pt (gstate, x, y);
+
+    gstate->last_move_pt = gstate->current_pt;
+
+    return status;
 }
 
 cairo_status_t
 _cairo_gstate_rel_line_to (cairo_gstate_t *gstate, double dx, double dy)
 {
+    cairo_status_t status;
+    double x, y;
+
     cairo_matrix_transform_distance (&gstate->ctm, &dx, &dy);
 
-    return cairo_path_rel_line_to (&gstate->path, dx, dy);
+    x = gstate->current_pt.x + dx;
+    y = gstate->current_pt.y + dy;
+
+    status = _cairo_path_line_to (&gstate->path, x, y);
+
+    _cairo_gstate_set_current_pt (gstate, x, y);
+
+    return status;
 }
 
 cairo_status_t
@@ -727,14 +751,22 @@
 			    double dx2, double dy2,
 			    double dx3, double dy3)
 {
+    cairo_status_t status;
+
     cairo_matrix_transform_distance (&gstate->ctm, &dx1, &dy1);
     cairo_matrix_transform_distance (&gstate->ctm, &dx2, &dy2);
     cairo_matrix_transform_distance (&gstate->ctm, &dx3, &dy3);
-    
-    return cairo_path_rel_curve_to (&gstate->path,
-				    dx1, dy1,
-				    dx2, dy2,
-				    dx3, dy3);
+
+    status = _cairo_path_curve_to (&gstate->path,
+				   gstate->current_pt.x + dx1, gstate->current_pt.y + dy1,
+				   gstate->current_pt.x + dx2, gstate->current_pt.y + dy2,
+				   gstate->current_pt.x + dx3, gstate->current_pt.y + dy3);
+
+    _cairo_gstate_set_current_pt (gstate,
+			  gstate->current_pt.x + dx3,
+			  gstate->current_pt.y + dy3);
+
+    return status;
 }
 
 /* XXX: NYI 
@@ -743,6 +775,7 @@
 {
     cairo_status_t status;
 
+    _cairo_pen_init (&gstate
     return CAIRO_STATUS_SUCCESS;
 }
 */
@@ -750,52 +783,33 @@
 cairo_status_t
 _cairo_gstate_close_path (cairo_gstate_t *gstate)
 {
-    return cairo_path_close_path (&gstate->path);
-}
-
-cairo_status_t
-_cairo_gstate_set_path (cairo_gstate_t *gstate, cairo_path_t *path)
-{
     cairo_status_t status;
 
-    _cairo_path_fini (&gstate->path);
-
-    status = _cairo_path_init_copy (&gstate->path, path);
-    if (status)
-	return status;
+    status = _cairo_path_close_path (&gstate->path);
 
-    _cairo_path_transform (&gstate->path, &gstate->ctm);
+    _cairo_gstate_set_current_pt (gstate,
+				  gstate->last_move_pt.x, 
+				  gstate->last_move_pt.y);
 
-    return CAIRO_STATUS_SUCCESS;
+    return status;
 }
 
 cairo_status_t
 _cairo_gstate_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
 {
-    cairo_status_t status;
+    double x, y;
 
-    status = cairo_path_current_point (&gstate->path, x_ret, y_ret);
-    if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
-	*x_ret = 0.0;
-	*y_ret = 0.0;
-	return CAIRO_STATUS_SUCCESS;
+    if (gstate->has_current_pt) {
+	x = gstate->current_pt.x;
+	y = gstate->current_pt.y;
+	cairo_matrix_transform_point (&gstate->ctm_inverse, &x, &y);
+    } else {
+	x = 0.0;
+	y = 0.0;
     }
 
-    cairo_matrix_transform_point (&gstate->ctm_inverse, x_ret, y_ret);
-
-    return CAIRO_STATUS_SUCCESS;
-}
-
-cairo_status_t
-_cairo_gstate_current_point_device (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
-{
-    cairo_status_t status;
-
-    status = cairo_path_current_point (&gstate->path, x_ret, y_ret);
-    if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
-	*x_ret = 0.0;
-	*y_ret = 0.0;
-    }
+    *x_ret = x;
+    *y_ret = y;
 
     return CAIRO_STATUS_SUCCESS;
 }
@@ -1116,7 +1130,17 @@
     if (gstate->surface->dpy == 0)
 	return CAIRO_STATUS_SUCCESS;
 
-    _cairo_gstate_current_point_device (gstate, &x, &y);
+    /* XXX: I believe this is correct, but it would be much more clear
+       to have some explicit current_point accesor functions, (one for
+       user- and one for device-space). */
+    if (gstate->has_current_pt) {
+	x = gstate->current_pt.x;
+	y = gstate->current_pt.y;
+    } else {
+	x = 0;
+	y = 0;
+	cairo_matrix_transform_point (&gstate->ctm, &x, &y);
+    }
 
     _cairo_font_resolve_xft_font (&gstate->font, gstate, &xft_font);
 

Index: cairo_path.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_path.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo_path.c	25 Sep 2003 15:01:39 -0000	1.5
+++ cairo_path.c	25 Sep 2003 22:01:28 -0000	1.6
@@ -62,43 +62,9 @@
 static void
 _cairo_path_arg_buf_add (cairo_path_arg_buf_t *arg, cairo_point_t *pts, int num_pts);
 
-cairo_path_t *
-cairo_path_create (void)
-{
-    cairo_path_t *path;
-
-    path = malloc (sizeof (cairo_path_t));
-    if (path == NULL)
-	return NULL;
-
-    _cairo_path_init (path);
-
-    return path;
-}
-
-cairo_path_t *
-_cairo_path_copy (cairo_path_t *other)
-{
-    cairo_path_t *path;
-
-    path = malloc (sizeof (cairo_path_t));
-    if (path == NULL)
-	return NULL;
-
-    _cairo_path_init_copy (path, other);
-
-    return path;
-}
-
 void
 _cairo_path_init (cairo_path_t *path)
 {
-    path->current_pt.x = 0.0;
-    path->current_pt.y = 0.0;
-    path->has_current_pt = 0;
-
-    cairo_matrix_set_identity (&path->ctm_inverse);
-
     path->op_head = NULL;
     path->op_tail = NULL;
 
@@ -114,11 +80,6 @@
 
     _cairo_path_init (path);
 
-    path->current_pt = other->current_pt;
-    path->has_current_pt = other->has_current_pt;
-
-    cairo_matrix_copy (&path->ctm_inverse, &other->ctm_inverse);
-
     for (other_op = other->op_head; other_op; other_op = other_op->next) {
 	op = _cairo_path_op_buf_create ();
 	if (op == NULL) {
@@ -159,74 +120,36 @@
 	_cairo_path_arg_buf_destroy (arg);
     }
     path->arg_tail = NULL;
-
-    path->current_pt.x = 0.0;
-    path->current_pt.y = 0.0;
-    path->has_current_pt = 0;
-}
-
-void
-cairo_path_destroy (cairo_path_t *path)
-{
-    _cairo_path_fini (path);
-
-    free (path);
-}
-
-static void
-_cairo_path_set_current_pt (cairo_path_t *path, double x, double y)
-{
-    path->current_pt.x = x;
-    path->current_pt.y = y;
-
-    path->has_current_pt = 1;
 }
 
 cairo_status_t
-cairo_path_move_to (cairo_path_t *path, double x, double y)
+_cairo_path_move_to (cairo_path_t *path, double x, double y)
 {
-    cairo_status_t status;
     cairo_point_t pt;
 
     pt.x = XDoubleToFixed (x);
     pt.y = XDoubleToFixed (y);
 
-    status = _cairo_path_add (path, cairo_path_op_move_to, &pt, 1);
-    if (status)
-	return status;
-
-    _cairo_path_set_current_pt (path, x, y);
-
-    path->last_move_pt = path->current_pt;
-
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_path_add (path, cairo_path_op_move_to, &pt, 1);
 }
 
 cairo_status_t
-cairo_path_line_to (cairo_path_t *path, double x, double y)
+_cairo_path_line_to (cairo_path_t *path, double x, double y)
 {
-    cairo_status_t status;
     cairo_point_t pt;
 
     pt.x = XDoubleToFixed (x);
     pt.y = XDoubleToFixed (y);
 
-    status = _cairo_path_add (path, cairo_path_op_line_to, &pt, 1);
-    if (status)
-	return status;
-
-    _cairo_path_set_current_pt (path, x, y);
-
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_path_add (path, cairo_path_op_line_to, &pt, 1);
 }
 
 cairo_status_t
-cairo_path_curve_to (cairo_path_t *path,
-		     double x1, double y1,
-		     double x2, double y2,
-		     double x3, double y3)
+_cairo_path_curve_to (cairo_path_t *path,
+		      double x1, double y1,
+		      double x2, double y2,
+		      double x3, double y3)
 {
-    cairo_status_t status;
     cairo_point_t pt[3];
 
     pt[0].x = XDoubleToFixed (x1);
@@ -238,102 +161,13 @@
     pt[2].x = XDoubleToFixed (x3);
     pt[2].y = XDoubleToFixed (y3);
 
-    status = _cairo_path_add (path, cairo_path_op_curve_to, pt, 3);
-    if (status)
-	return status;
-
-    _cairo_path_set_current_pt (path, x3, y3);
-
-    return CAIRO_STATUS_SUCCESS;
-}
-
-cairo_status_t
-cairo_path_rel_move_to (cairo_path_t *path,
-			 double dx, double dy)
-{
-    return cairo_path_move_to (path,
-			       path->current_pt.x + dx,
-			       path->current_pt.y + dy);
-}
-
-cairo_status_t
-cairo_path_rel_line_to (cairo_path_t *path,
-			 double dx, double dy)
-{
-    return cairo_path_line_to (path,
-			       path->current_pt.x + dx,
-			       path->current_pt.y + dy);
-}
-
-cairo_status_t
-cairo_path_rel_curve_to (cairo_path_t *path,
-			 double dx1, double dy1,
-			 double dx2, double dy2,
-			 double dx3, double dy3)
-{
-    return cairo_path_curve_to (path,
-				path->current_pt.x + dx1, path->current_pt.y + dy1,
-				path->current_pt.x + dx2, path->current_pt.y + dy2,
-				path->current_pt.x + dx3, path->current_pt.y + dy3);
-}
-
-cairo_status_t
-cairo_path_close_path (cairo_path_t *path)
-{
-    cairo_status_t status;
-
-    status = _cairo_path_add (path, cairo_path_op_close_path, NULL, 0);
-    if (status)
-	return status;
-
-    _cairo_path_set_current_pt (path,
-				path->last_move_pt.x, 
-				path->last_move_pt.y);
-
-    return CAIRO_STATUS_SUCCESS;
-}
-
-cairo_status_t
-cairo_path_current_point (cairo_path_t *path, double *x_ret, double *y_ret)
-{
-    if (! path->has_current_pt)
-	return CAIRO_STATUS_NO_CURRENT_POINT;
-
-    *x_ret = path->current_pt.x;
-    *y_ret = path->current_pt.y;
-
-    return CAIRO_STATUS_SUCCESS;
-}
-
-cairo_status_t
-_cairo_path_set_ctm_inverse (cairo_path_t *path, cairo_matrix_t *ctm_inverse)
-{
-    cairo_matrix_copy (&path->ctm_inverse, ctm_inverse);
-
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_path_add (path, cairo_path_op_curve_to, pt, 3);
 }
 
 cairo_status_t
-_cairo_path_transform (cairo_path_t *path, cairo_matrix_t *matrix)
+_cairo_path_close_path (cairo_path_t *path)
 {
-    cairo_matrix_t transform;
-    cairo_path_arg_buf_t *arg_buf;
-    int i;
-
-    cairo_matrix_multiply (&transform, matrix, &path->ctm_inverse);
-
-    for (arg_buf = path->arg_head; arg_buf; arg_buf = arg_buf->next) {
-	for (i = 0; i < arg_buf->num_pts; i++) {
-	    double x, y;
-	    x = _cairo_fixed_to_double (arg_buf->pt[i].x);
-	    y = _cairo_fixed_to_double (arg_buf->pt[i].y);
-	    cairo_matrix_transform_point (matrix, &x, &y);
-	    arg_buf->pt[i].x = _cairo_fixed_from_double (x);
-	    arg_buf->pt[i].y = _cairo_fixed_from_double (y);
-	}
-    }
-
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_path_add (path, cairo_path_op_close_path, NULL, 0);
 }
 
 static cairo_status_t

Index: cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cairoint.h	25 Sep 2003 15:01:39 -0000	1.18
+++ cairoint.h	25 Sep 2003 22:01:28 -0000	1.19
@@ -132,10 +132,6 @@
     cairo_int_status_degenerate = 1000
 } cairo_int_status_t;
 
-struct cairo_matrix {
-    double m[3][2];
-};
-
 typedef enum cairo_path_op {
     cairo_path_op_move_to = 0,
     cairo_path_op_line_to = 1,
@@ -176,19 +172,13 @@
     struct cairo_path_arg_buf *next, *prev;
 } cairo_path_arg_buf_t;
 
-struct cairo_path {
-    cairo_point_double_t last_move_pt;
-    cairo_point_double_t current_pt;
-    int has_current_pt;
-
-    cairo_matrix_t ctm_inverse;
-
+typedef struct cairo_path {
     cairo_path_op_buf_t *op_head;
     cairo_path_op_buf_t *op_tail;
 
     cairo_path_arg_buf_t *arg_head;
     cairo_path_arg_buf_t *arg_tail;
-};
+} cairo_path_t;
 
 typedef struct cairo_edge {
     cairo_line_t edge;
@@ -295,6 +285,10 @@
     unsigned short alpha_short;
 } cairo_color_t;
 
+struct cairo_matrix {
+    double m[3][2];
+};
+
 typedef struct cairo_traps {
     cairo_trapezoid_t *traps;
     int num_traps;
@@ -366,6 +360,10 @@
 
     cairo_path_t path;
 
+    cairo_point_double_t last_move_pt;
+    cairo_point_double_t current_pt;
+    int has_current_pt;
+
     cairo_pen_t pen_regular;
 
     struct cairo_gstate *next;
@@ -412,7 +410,7 @@
 _cairo_gstate_destroy (cairo_gstate_t *gstate);
 
 extern cairo_gstate_t * __internal_linkage
-_cairo_gstate_copy (cairo_gstate_t *other);
+_cairo_gstate_clone (cairo_gstate_t *gstate);
 
 extern cairo_status_t __internal_linkage
 _cairo_gstate_begin_group (cairo_gstate_t *gstate);
@@ -435,9 +433,6 @@
 extern cairo_surface_t * __internal_linkage
 _cairo_gstate_current_target_surface (cairo_gstate_t *gstate);
 
-extern cairo_path_t * __internal_linkage
-_cairo_gstate_current_path (cairo_gstate_t *gstate);
-
 extern cairo_status_t __internal_linkage
 _cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_surface_t *pattern);
 
@@ -574,15 +569,9 @@
 extern cairo_status_t __internal_linkage
 _cairo_gstate_close_path (cairo_gstate_t *gstate);
 
-cairo_status_t
-_cairo_gstate_set_path (cairo_gstate_t *gstate, cairo_path_t *path);
-
 extern cairo_status_t __internal_linkage
 _cairo_gstate_current_point (cairo_gstate_t *gstate, double *x, double *y);
 
-cairo_status_t
-_cairo_gstate_current_point_device (cairo_gstate_t *gstate, double *x_ret, double *y_ret);
-
 extern cairo_status_t __internal_linkage
 _cairo_gstate_stroke (cairo_gstate_t *gstate);
 
@@ -660,9 +649,6 @@
 _cairo_font_resolve_xft_font (cairo_font_t *font, cairo_gstate_t *gstate, XftFont **xft_font);
 
 /* cairo_path.c */
-extern cairo_path_t * __internal_linkage
-_cairo_path_copy (cairo_path_t *other);
-
 extern void __internal_linkage
 _cairo_path_init (cairo_path_t *path);
 
@@ -673,6 +659,21 @@
 _cairo_path_fini (cairo_path_t *path);
 
 extern cairo_status_t __internal_linkage
+_cairo_path_move_to (cairo_path_t *path, double x, double y);
+
+extern cairo_status_t __internal_linkage
+_cairo_path_line_to (cairo_path_t *path, double x, double y);
+
+extern cairo_status_t __internal_linkage
+_cairo_path_curve_to (cairo_path_t *path,
+		      double x1, double y1,
+		      double x2, double y2,
+		      double x3, double y3);
+
+extern cairo_status_t __internal_linkage
+_cairo_path_close_path (cairo_path_t *path);
+
+extern cairo_status_t __internal_linkage
 _cairo_path_interpret (cairo_path_t *path,
 		       cairo_path_direction_t dir,
 		       const cairo_path_callbacks_t *cb,
@@ -681,12 +682,6 @@
 extern cairo_status_t __internal_linkage
 _cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, double *y2);
 
-cairo_status_t
-_cairo_path_set_ctm_inverse (cairo_path_t *path, cairo_matrix_t *ctm_inverse);
-
-cairo_status_t
-_cairo_path_transform (cairo_path_t *path, cairo_matrix_t *matrix);
-
 /* cairo_path_fill.c */
 extern cairo_status_t __internal_linkage
 _cairo_path_fill_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_traps_t *traps);
@@ -871,7 +866,6 @@
 /* Avoid unnecessary PLT entries.  */
 
 slim_hidden_proto(cairo_close_path)
-slim_hidden_proto(cairo_set_path)
 slim_hidden_proto(cairo_matrix_copy)
 slim_hidden_proto(cairo_matrix_invert)
 slim_hidden_proto(cairo_matrix_multiply)




More information about the Commit mailing list