1 Index: src/cairo-path-stroke.c
2 ===================================================================
3 --- src/cairo-path-stroke.c (revision 113075)
4 +++ src/cairo-path-stroke.c (working copy)
9 + case CAIRO_LINE_CAP_TRIANGLE: {
11 + cairo_slope_t fvector;
13 + cairo_polygon_t polygon;
15 + dx = f->usr_vector.x;
16 + dy = f->usr_vector.y;
17 + dx *= stroker->style->line_width / 2.0;
18 + dy *= stroker->style->line_width / 2.0;
19 + cairo_matrix_transform_distance (stroker->ctm, &dx, &dy);
20 + fvector.dx = _cairo_fixed_from_double (dx);
21 + fvector.dy = _cairo_fixed_from_double (dy);
22 + mid.x = ((f->ccw.x + f->cw.x) / 2.0) + fvector.dx;
23 + mid.y = ((f->ccw.y + f->cw.y) / 2.0) + fvector.dy;
25 + _cairo_polygon_init (&polygon);
26 + _cairo_polygon_move_to (&polygon, &f->cw);
27 + _cairo_polygon_line_to (&polygon, &mid);
28 + _cairo_polygon_line_to (&polygon, &f->ccw);
29 + _cairo_polygon_close (&polygon);
30 + status = _cairo_polygon_status (&polygon);
32 + if (status == CAIRO_STATUS_SUCCESS) {
33 + status = _cairo_bentley_ottmann_tessellate_polygon (stroker->traps,
35 + CAIRO_FILL_RULE_WINDING);
38 + _cairo_polygon_fini (&polygon);
42 case CAIRO_LINE_CAP_BUTT:
44 return CAIRO_STATUS_SUCCESS;
46 ===================================================================
47 --- src/cairo.h (revision 113075)
48 +++ src/cairo.h (working copy)
50 * @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point
51 * @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point
52 * @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point
53 + * @CAIRO_LINE_CAP_TRIANGLE: use triangle ending, the center of the triangle is the end point (used in Silverlight)
55 * Specifies how to render the endpoints of the path when stroking.
58 typedef enum _cairo_line_cap {
61 - CAIRO_LINE_CAP_SQUARE
62 + CAIRO_LINE_CAP_SQUARE,
63 + CAIRO_LINE_CAP_TRIANGLE