summaryrefslogtreecommitdiff
path: root/src/cairo-pen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-pen.c')
-rw-r--r--src/cairo-pen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cairo-pen.c b/src/cairo-pen.c
index a2cd55d93..91a6f44c5 100644
--- a/src/cairo-pen.c
+++ b/src/cairo-pen.c
@@ -79,7 +79,7 @@ _cairo_pen_init (cairo_pen_t *pen,
pen->num_vertices = _cairo_pen_vertices_needed (tolerance,
radius,
ctm);
-
+
pen->vertices = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
if (pen->vertices == NULL) {
return CAIRO_STATUS_NO_MEMORY;
@@ -252,21 +252,21 @@ _cairo_pen_vertices_needed (double tolerance,
* compute major axis length for a pen with the specified radius.
* we don't need the minor axis length.
*/
-
+
double major_axis = _cairo_matrix_transformed_circle_major_axis(matrix, radius);
/*
* compute number of vertices needed
*/
int num_vertices;
-
+
/* Where tolerance / M is > 1, we use 4 points */
if (tolerance >= major_axis) {
num_vertices = 4;
} else {
double delta = acos (1 - tolerance / major_axis);
num_vertices = ceil (M_PI / delta);
-
+
/* number of vertices must be even */
if (num_vertices % 2)
num_vertices++;
@@ -443,6 +443,6 @@ _cairo_pen_stroke_spline (cairo_pen_t *pen,
_cairo_polygon_close (&polygon);
_cairo_traps_tessellate_polygon (traps, &polygon, CAIRO_FILL_RULE_WINDING);
_cairo_polygon_fini (&polygon);
-
+
return CAIRO_STATUS_SUCCESS;
}