summaryrefslogtreecommitdiff
path: root/src/cairoint.h
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2009-11-10 23:09:56 +0100
committerAndrea Canciani <ranma42@gmail.com>2009-11-11 18:21:04 +0100
commit26e9f149063b9e1fdb54fc54fccbefdf04a68190 (patch)
tree002b1632435e47bf43174299d67f787127cd5a1f /src/cairoint.h
parent9c24288c820069e80b0feb5e99ece4c89e92c0c6 (diff)
Improve stroking of densely dashed styles
Add some auxiliary functions to cairo-stroke-style to compute properties of the dashed patterns (period, "on" coverage) and to generate approximations when the dash pattern is sub-tolerance. These functions are used in cairo-path-stroke to simplify dash patterns stroked by cairo. Fixes dash-infinite-loop See http://bugs.freedesktop.org/show_bug.cgi?id=24702
Diffstat (limited to 'src/cairoint.h')
-rw-r--r--src/cairoint.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cairoint.h b/src/cairoint.h
index 5912173f..14a9491d 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -1749,6 +1749,26 @@ _cairo_stroke_style_max_distance_from_path (const cairo_stroke_style_t *style,
const cairo_matrix_t *ctm,
double *dx, double *dy);
+cairo_private double
+_cairo_stroke_style_dash_period (const cairo_stroke_style_t *style);
+
+cairo_private double
+_cairo_stroke_style_dash_stroked (const cairo_stroke_style_t *style);
+
+cairo_private cairo_bool_t
+_cairo_stroke_style_dash_can_approximate (const cairo_stroke_style_t *style,
+ const cairo_matrix_t *ctm,
+ double tolerance);
+
+cairo_private void
+_cairo_stroke_style_dash_approximate (const cairo_stroke_style_t *style,
+ const cairo_matrix_t *ctm,
+ double tolerance,
+ double *dash_offset,
+ double *dashes,
+ unsigned int *num_dashes);
+
+
/* cairo-surface.c */
cairo_private cairo_surface_t *