[cairo-commit]
cairo-demo/png ChangeLog, 1.20, 1.21 snapping.c, 1.4, 1.5
Carl Worth
commit at pdx.freedesktop.org
Wed Nov 3 18:52:08 PST 2004
- Previous message: [cairo-commit] rendertest/src args.c, 1.3, 1.4 glitz.c, 1.4,
1.5 glitz_agl.c, 1.5, 1.6 glitz_common.h, 1.3, 1.4 glitz_glx.c,
1.5, 1.6 pixman.c, 1.1, 1.2 rendertest.c, 1.8,
1.9 rendertest.h, 1.3, 1.4 xcb.c, 1.5, 1.6
- Next message: [cairo-commit] pycairo/cairo Makefile.am, 1.4, 1.5 cairomodule.c,
1.4, 1.5 pycairo-context.c, 1.6, 1.7 pycairo-pattern.c, NONE,
1.1 pycairo-private.h, 1.2, 1.3 pycairo.h, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: cworth
Update of /cvs/cairo/cairo-demo/png
In directory gabe:/tmp/cvs-serv24699
Modified Files:
ChangeLog snapping.c
Log Message:
* snapping.c (snap_point_for_fill): Fix typo snapping y to x.
(snap_line_width): Fix to maintain sign of width when clamping to
maintain >= 1.0. Without this, a reflective transformation would
cause the width to go negative and the line would disappear.
Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/ChangeLog,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ChangeLog 3 Nov 2004 21:03:12 -0000 1.20
+++ ChangeLog 4 Nov 2004 02:52:06 -0000 1.21
@@ -1,6 +1,9 @@
2004-11-03 Carl Worth <cworth at cworth.org>
* snapping.c (snap_point_for_fill): Fix typo snapping y to x.
+ (snap_line_width): Fix to maintain sign of width when clamping to
+ maintain >= 1.0. Without this, a reflective transformation would
+ cause the width to go negative and the line would disappear.
2004-10-25 Carl Worth <cworth at cworth.org>
Index: snapping.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/png/snapping.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- snapping.c 3 Nov 2004 21:03:12 -0000 1.4
+++ snapping.c 4 Nov 2004 02:52:06 -0000 1.5
@@ -124,13 +124,24 @@
cairo_transform_distance (cr, &x_width, &y_width);
+ /* If the line width is less than 1 then it will round to 0 and
+ * disappear. Instead, we clamp it to 1.0, but we must preserve
+ * its sign for the case of a reflecting transformation. */
x_width_snapped = floor (x_width + 0.5);
- if (x_width_snapped < 1.0)
- x_width_snapped = 1.0;
+ if (fabs(x_width_snapped) < 1.0) {
+ if (x_width > 0)
+ x_width_snapped = 1.0;
+ else
+ x_width_snapped = -1.0;
+ }
y_width_snapped = floor (y_width + 0.5);
- if (y_width_snapped < 1.0)
- y_width_snapped = 1.0;
+ if (fabs(y_width_snapped) < 1.0) {
+ if (y_width > 0)
+ y_width_snapped = 1.0;
+ else
+ y_width_snapped = -1.0;
+ }
x_error = fabs (x_width - x_width_snapped);
y_error = fabs (y_width - y_width_snapped);
- Previous message: [cairo-commit] rendertest/src args.c, 1.3, 1.4 glitz.c, 1.4,
1.5 glitz_agl.c, 1.5, 1.6 glitz_common.h, 1.3, 1.4 glitz_glx.c,
1.5, 1.6 pixman.c, 1.1, 1.2 rendertest.c, 1.8,
1.9 rendertest.h, 1.3, 1.4 xcb.c, 1.5, 1.6
- Next message: [cairo-commit] pycairo/cairo Makefile.am, 1.4, 1.5 cairomodule.c,
1.4, 1.5 pycairo-context.c, 1.6, 1.7 pycairo-pattern.c, NONE,
1.1 pycairo-private.h, 1.2, 1.3 pycairo.h, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list