summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUGS7
-rw-r--r--ChangeLog10
-rw-r--r--TODO2
-rw-r--r--src/cairo-polygon.c5
-rw-r--r--src/cairo-spline.c5
-rw-r--r--src/cairo-traps.c2
-rw-r--r--src/cairo_polygon.c5
-rw-r--r--src/cairo_spline.c5
-rw-r--r--src/cairo_traps.c2
9 files changed, 27 insertions, 16 deletions
diff --git a/BUGS b/BUGS
index e7baa3fc..7803b41b 100644
--- a/BUGS
+++ b/BUGS
@@ -1,3 +1,10 @@
+--
+
+centi_unfinished.svg has big black portions when drawn with svg2png,
+(but not when drawn with xsvg).
+
+--
+
The caches need to be invalidated at font destruction time.
--
diff --git a/ChangeLog b/ChangeLog
index f78dcd03..d8c91739 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-12-23 Carl Worth <cworth@cworth.org>
+
+ * src/cairo_traps.c: Remove unused CAIRO_TRAPS_GROWTH_INC.
+
+ * src/cairo_spline.c (_cairo_spline_add_point):
+ * src/cairo_polygon.c (_cairo_polygon_add_edge): Resize arrays by
+ doubling rather than by linear increments.
+
+ * BUGS: Add new bug exposed centi_unfinished.svg.
+
2004-12-21 Carl Worth <cworth@cworth.org>
* src/cairoint.h:
diff --git a/TODO b/TODO
index 2f594ec5..d21c26ea 100644
--- a/TODO
+++ b/TODO
@@ -74,6 +74,8 @@ functions:
* Verification, profiling, optimization.
+ centi_unfinished.svg may provide a good test case.
+
A comparison with PostScript
============================
diff --git a/src/cairo-polygon.c b/src/cairo-polygon.c
index 8fa32f9f..e8585803 100644
--- a/src/cairo-polygon.c
+++ b/src/cairo-polygon.c
@@ -37,8 +37,6 @@
#include <stdlib.h>
#include "cairoint.h"
-#define CAIRO_POLYGON_GROWTH_INC 10
-
/* private functions */
static cairo_status_t
@@ -104,7 +102,8 @@ _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_poin
}
if (polygon->num_edges >= polygon->edges_size) {
- status = _cairo_polygon_grow_by (polygon, CAIRO_POLYGON_GROWTH_INC);
+ int additional = polygon->edges_size ? polygon->edges_size : 16;
+ status = _cairo_polygon_grow_by (polygon, additional);
if (status) {
return status;
}
diff --git a/src/cairo-spline.c b/src/cairo-spline.c
index bed351ef..ff290d9d 100644
--- a/src/cairo-spline.c
+++ b/src/cairo-spline.c
@@ -54,8 +54,6 @@ _cairo_spline_error_squared (cairo_spline_t *spline);
static cairo_status_t
_cairo_spline_decompose_into (cairo_spline_t *spline, double tolerance_squared, cairo_spline_t *result);
-#define CAIRO_SPLINE_GROWTH_INC 100
-
cairo_int_status_t
_cairo_spline_init (cairo_spline_t *spline,
cairo_point_t *a, cairo_point_t *b,
@@ -136,7 +134,8 @@ _cairo_spline_add_point (cairo_spline_t *spline, cairo_point_t *point)
}
if (spline->num_points >= spline->points_size) {
- status = _cairo_spline_grow_by (spline, CAIRO_SPLINE_GROWTH_INC);
+ int additional = spline->points_size ? spline->points_size : 32;
+ status = _cairo_spline_grow_by (spline, additional);
if (status)
return status;
}
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 8f8d035c..1cea698a 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -37,8 +37,6 @@
#include "cairoint.h"
-#define CAIRO_TRAPS_GROWTH_INC 10
-
/* private functions */
static cairo_status_t
diff --git a/src/cairo_polygon.c b/src/cairo_polygon.c
index 8fa32f9f..e8585803 100644
--- a/src/cairo_polygon.c
+++ b/src/cairo_polygon.c
@@ -37,8 +37,6 @@
#include <stdlib.h>
#include "cairoint.h"
-#define CAIRO_POLYGON_GROWTH_INC 10
-
/* private functions */
static cairo_status_t
@@ -104,7 +102,8 @@ _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_poin
}
if (polygon->num_edges >= polygon->edges_size) {
- status = _cairo_polygon_grow_by (polygon, CAIRO_POLYGON_GROWTH_INC);
+ int additional = polygon->edges_size ? polygon->edges_size : 16;
+ status = _cairo_polygon_grow_by (polygon, additional);
if (status) {
return status;
}
diff --git a/src/cairo_spline.c b/src/cairo_spline.c
index bed351ef..ff290d9d 100644
--- a/src/cairo_spline.c
+++ b/src/cairo_spline.c
@@ -54,8 +54,6 @@ _cairo_spline_error_squared (cairo_spline_t *spline);
static cairo_status_t
_cairo_spline_decompose_into (cairo_spline_t *spline, double tolerance_squared, cairo_spline_t *result);
-#define CAIRO_SPLINE_GROWTH_INC 100
-
cairo_int_status_t
_cairo_spline_init (cairo_spline_t *spline,
cairo_point_t *a, cairo_point_t *b,
@@ -136,7 +134,8 @@ _cairo_spline_add_point (cairo_spline_t *spline, cairo_point_t *point)
}
if (spline->num_points >= spline->points_size) {
- status = _cairo_spline_grow_by (spline, CAIRO_SPLINE_GROWTH_INC);
+ int additional = spline->points_size ? spline->points_size : 32;
+ status = _cairo_spline_grow_by (spline, additional);
if (status)
return status;
}
diff --git a/src/cairo_traps.c b/src/cairo_traps.c
index 8f8d035c..1cea698a 100644
--- a/src/cairo_traps.c
+++ b/src/cairo_traps.c
@@ -37,8 +37,6 @@
#include "cairoint.h"
-#define CAIRO_TRAPS_GROWTH_INC 10
-
/* private functions */
static cairo_status_t