/* Computes the period of a dashed stroke style. Returns 0 for non-dashed styles.  */
double _cairo_stroke_style_dash_period(const cairo_stroke_style_t *style)
/* Computes the period of a dashed stroke style. Returns 0 for non-dashed styles.  */
double _cairo_stroke_style_dash_period(const cairo_stroke_style_t *style)
{
    double period;
    unsigned int i;
    period = 0.0;
    for (i = 0; i < style->num_dashes; i++)
	period += style->dash[i];
    if (style->num_dashes & 1)
	period *= 2.0;
    return period;
}