[cairo-commit] cairo/src cairo-svg-surface.c,1.8,1.9
Emmanuel Pacaud
commit at pdx.freedesktop.org
Sun Jan 29 13:25:12 PST 2006
Committed by: emmanuel
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv18060/src
Modified Files:
cairo-svg-surface.c
Log Message:
2006-01-29 Emmanuel Pacaud <emmanuel.pacaud at free.fr>
* src/cairo-svg-surface.c (emit_pattern_stops): fix offset of pattern
stops.
Index: cairo-svg-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-svg-surface.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cairo-svg-surface.c 5 Jan 2006 23:00:37 -0000 1.8
+++ cairo-svg-surface.c 29 Jan 2006 21:25:10 -0000 1.9
@@ -743,7 +743,7 @@
xmlNodePtr child;
xmlBufferPtr id;
double x0, y0, x1, y1, r0, r1;
- double start_offset, fx, fy;
+ double fx, fy;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
child = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("radialGradient"), NULL);
@@ -779,9 +779,7 @@
fx = (r1 * x0 - r0 * x1) / (r1 - r0);
fy = (r1 * y0 - r0 * y1) / (r1 - r0);
- start_offset = (fx - x0) / (fx - x1);
-
- emit_pattern_stops (child, &pattern->base, start_offset);
+ emit_pattern_stops (child, &pattern->base, r0 / r1);
_cairo_dtostr (buffer, sizeof buffer, x1);
xmlSetProp (child, CC2XML ("cx"), C2XML (buffer));
More information about the cairo-commit
mailing list