131
_cairo_stroke_style_max_line_distance_from_path (const cairo_stroke_style_t *style,
132
const cairo_path_fixed_t *path,
133
const cairo_matrix_t *ctm,
134
double *dx, double *dy)
136
double style_expansion = 0.5 * style->line_width;
137
if (_cairo_matrix_has_unity_scale (ctm)) {
138
*dx = *dy = style_expansion;
140
*dx = style_expansion * hypot (ctm->xx, ctm->xy);
141
*dy = style_expansion * hypot (ctm->yy, ctm->yx);
146
_cairo_stroke_style_max_join_distance_from_path (const cairo_stroke_style_t *style,
147
const cairo_path_fixed_t *path,
148
const cairo_matrix_t *ctm,
149
double *dx, double *dy)
151
double style_expansion = 0.5;
153
if (style->line_join == CAIRO_LINE_JOIN_MITER &&
154
! path->stroke_is_rectilinear &&
155
style_expansion < M_SQRT2 * style->miter_limit)
157
style_expansion = M_SQRT2 * style->miter_limit;
160
style_expansion *= style->line_width;
162
if (_cairo_matrix_has_unity_scale (ctm)) {
163
*dx = *dy = style_expansion;
165
*dx = style_expansion * hypot (ctm->xx, ctm->xy);
166
*dy = style_expansion * hypot (ctm->yy, ctm->yx);
131
170
* Computes the period of a dashed stroke style.
132
171
* Returns 0 for non-dashed styles.