third_party/cairo/src/cairo-path-stroke-polygon.c
static void
add_fan (struct stroker *stroker,
	 const cairo_slope_t *in_vector,
	 const cairo_slope_t *out_vector,
	 const cairo_point_t *midpt,
	 cairo_bool_t clockwise,
	 struct stroke_contour *c)
{
    cairo_pen_t *pen = &stroker->pen;
    int start, stop;

    if (stroker->has_bounds &&
	! _cairo_box_contains_point (&stroker->bounds, midpt))
	return;

    assert (stroker->pen.num_vertices);

    if (clockwise) {
	_cairo_pen_find_active_cw_vertices (pen,
					    in_vector, out_vector,
					    &start, &stop);
	while (start != stop) {
	    cairo_point_t p = *midpt;
	    translate_point (&p, &pen->vertices[start].point);
	    contour_add_point (stroker, c, &p);

	    if (++start == pen->num_vertices)
		start = 0;
	}
    } else {
	_cairo_pen_find_active_ccw_vertices (pen,
					     in_vector, out_vector,
					     &start, &stop);
	while (start != stop) {
	    cairo_point_t p = *midpt;
	    translate_point (&p, &pen->vertices[start].point);
	    contour_add_point (stroker, c, &p);

	    if (start-- == 0)
		start += pen->num_vertices;
	}
    }
}
/*
 * Construct a fan around the midpoint using the vertices from pen between
 * inpt and outpt.
 */
Construct a fan around the midpoint using the vertices from pen between
inpt and outpt.
Construct a fan around the midpoint using the vertices from pen between inpt and outpt .
static void
add_fan (struct stroker *stroker,
	 const cairo_slope_t *in_vector,
	 const cairo_slope_t *out_vector,
	 const cairo_point_t *midpt,
	 cairo_bool_t clockwise,
	 struct stroke_contour *c)
{
    cairo_pen_t *pen = &stroker->pen;
    int start, stop;
    if (stroker->has_bounds &&
	! _cairo_box_contains_point (&stroker->bounds, midpt))
	return;
    assert (stroker->pen.num_vertices);
    if (clockwise) {
	_cairo_pen_find_active_cw_vertices (pen,
					    in_vector, out_vector,
					    &start, &stop);
	while (start != stop) {
	    cairo_point_t p = *midpt;
	    translate_point (&p, &pen->vertices[start].point);
	    contour_add_point (stroker, c, &p);
	    if (++start == pen->num_vertices)
		start = 0;
	}
    } else {
	_cairo_pen_find_active_ccw_vertices (pen,
					     in_vector, out_vector,
					     &start, &stop);
	while (start != stop) {
	    cairo_point_t p = *midpt;
	    translate_point (&p, &pen->vertices[start].point);
	    contour_add_point (stroker, c, &p);
	    if (start-- == 0)
		start += pen->num_vertices;
	}
    }
}
static void add_fan ( struct stroker * stroker , const cairo_slope_t * in_vector , const cairo_slope_t * out_vector , const cairo_point_t * midpt , cairo_bool_t clockwise , struct stroke_contour * c ) { cairo_pen_t * pen = & stroker -> pen ; int start , stop ; if ( stroker -> has_bounds && ! _cairo_box_contains_point ( & stroker -> bounds , midpt ) ) return ; assert ( stroker -> pen . num_vertices ) ; if ( clockwise ) { _cairo_pen_find_active_cw_vertices ( pen , in_vector , out_vector , & start , & stop ) ; while ( start != stop ) { cairo_point_t p = * midpt ; translate_point ( & p , & pen -> vertices [ start ] . point ) ; contour_add_point ( stroker , c , & p ) ; if ( ++ start == pen -> num_vertices ) start = 0 ; } } else { _cairo_pen_find_active_ccw_vertices ( pen , in_vector , out_vector , & start , & stop ) ; while ( start != stop ) { cairo_point_t p = * midpt ; translate_point ( & p , & pen -> vertices [ start ] . point ) ; contour_add_point ( stroker , c , & p ) ; if ( start -- == 0 ) start += pen -> num_vertices ; } } }
Construct a fan around the midpoint using the vertices from pen between
 inpt and outpt.
Construct a fan around the midpoint using the vertices from pen between inpt and outpt .