[cairo-commit] src/cairo-pdf-surface.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat Jan 20 10:02:08 PST 2007
src/cairo-pdf-surface.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
New commits:
diff-tree 1a8d0a33ce589367f0e46006caecb544a3945048 (from 1e52ce5a0981aac72452f1f7d7988e6382b0abcc)
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Jan 20 13:01:35 2007 -0500
PDF: Fix approximate diagonal in recent commit
Use x+y as an upper bound for sqrt(x*x+y*y), not x*y.
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 696a8d8..7223726 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -922,8 +922,7 @@ emit_surface_pattern (cairo_pdf_surface_
y1 = MAX (fabs(y1), fabs(y2)) + surface_extents.height;
/* Similarly, don't bother computing the square root to
* determine the length of the final diagonal. */
- xstep = _cairo_lround (ceil (x1 * y1));
- ystep = _cairo_lround (ceil (x1 * y1));
+ xstep = ystep = _cairo_lround (ceil (x1 + y1));
}
break;
case CAIRO_EXTEND_REPEAT:
More information about the cairo-commit
mailing list