Bug 285475 - fix cairo calculation of stroke extents on lines with caps.

This commit is contained in:
tor%cs.brown.edu 2005-03-30 17:32:16 +00:00
parent 349d1fef20
commit 4c1bc91ccf
3 changed files with 25 additions and 0 deletions

View File

@ -17,3 +17,5 @@ PATCHES:
quartz.diff - update cairo quartz/atsui backend for 0.4.0, reenable.
xlib.diff - include X11/xlib.h in cairo-xlib.h - needed for Solaris.
stroke-extent.diff - fix calculation of stroke extents.

View File

@ -1700,6 +1700,8 @@ _cairo_gstate_stroke_extents (cairo_gstate_t *gstate,
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);

View File

@ -0,0 +1,21 @@
--- 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);