[cairo-commit] cairo/src cairo_path_stroke.c,1.13,1.14
Carl Worth
commit at pdx.freedesktop.org
Sat Jan 24 01:56:28 PST 2004
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv830/src
Modified Files:
cairo_path_stroke.c
Log Message:
* src/cairo_path_stroke.c (_cairo_stroker_add_sub_edge): Fix to
use tessellate_polygon instead of tessellate_rectangle as the
matrix may have skewed the coordinates into a non-rectangular
shape.
Index: cairo_path_stroke.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_path_stroke.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** cairo_path_stroke.c 8 Dec 2003 21:38:26 -0000 1.13
--- cairo_path_stroke.c 24 Jan 2004 09:56:26 -0000 1.14
***************
*** 471,476 ****
cairo_stroke_face_t *start, cairo_stroke_face_t *end)
{
cairo_gstate_t *gstate = stroker->gstate;
! cairo_point_t quad[4];
cairo_slope_t slope;
--- 471,477 ----
cairo_stroke_face_t *start, cairo_stroke_face_t *end)
{
+ cairo_status_t status;
cairo_gstate_t *gstate = stroker->gstate;
! cairo_polygon_t polygon;
cairo_slope_t slope;
***************
*** 490,499 ****
_compute_face (p2, &slope, gstate, end);
! quad[0] = start->cw;
! quad[1] = start->ccw;
! quad[2] = end->ccw;
! quad[3] = end->cw;
! return _cairo_traps_tessellate_rectangle (stroker->traps, quad);
}
--- 491,512 ----
_compute_face (p2, &slope, gstate, end);
! _cairo_polygon_init (&polygon);
! _cairo_polygon_move_to (&polygon, &start->cw);
! _cairo_polygon_line_to (&polygon, &start->ccw);
! _cairo_polygon_line_to (&polygon, &end->ccw);
! _cairo_polygon_line_to (&polygon, &end->cw);
! _cairo_polygon_close (&polygon);
! /* XXX: We can't use tessellate_rectangle as the matrix may have
! skewed this into a non-rectangular shape. Perhaps it would be
! worth checking the matrix for skew so that the common case
! could use the faster tessellate_rectangle rather than
! tessellate_polygon? */
! status = _cairo_traps_tessellate_polygon (stroker->traps,
! &polygon, CAIRO_FILL_RULE_WINDING);
!
! _cairo_polygon_fini (&polygon);
!
! return status;
}
More information about the cairo-commit
mailing list