Mozilla/mozilla/gfx/cairo/stroke-extent.diff
tor%cs.brown.edu dedf84488e Bug 285475 - fix cairo calculation of stroke extents on lines with caps.
git-svn-id: svn://10.0.0.236/trunk@171393 18797224-902f-48f8-a5cc-f745e15eee43
2005-03-30 17:32:16 +00:00

22 lines
719 B
Diff

--- cairo-0.4.0/src/cairo_gstate.c 2005-03-04 11:57:53.000000000 -0600
+++ cairo/src/cairo_gstate.c 2005-03-30 11:16:57.576419878 -0600
@@ -1695,16 +1695,18 @@ _cairo_gstate_show_page (cairo_gstate_t
cairo_status_t
_cairo_gstate_stroke_extents (cairo_gstate_t *gstate,
double *x1, double *y1,
double *x2, double *y2)
{
cairo_status_t status;
cairo_traps_t traps;
cairo_box_t extents;
+
+ _cairo_pen_init (&gstate->pen_regular, gstate->line_width / 2.0, gstate);
_cairo_traps_init (&traps);
status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
_cairo_traps_extents (&traps, &extents);