[gs-cvs] rev 7188 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Mon Nov 13 03:04:18 PST 2006
Author: leonardo
Date: 2006-11-13 03:04:18 -0800 (Mon, 13 Nov 2006)
New Revision: 7188
Modified:
trunk/gs/src/gxshade6.c
Log:
Fix (shadings) : A better average color when filling a triangle.
DETAILS :
Due to a misprint, the old code wrongly computed the average color
from 3 colors of triangle vertices.
Minor change : pfs->color_stack_limit is int rather than a pointer,
so NULLL isn't a good initilizer.
EXPECTED DIFFERENCES :
An unimportant single pixel difference in color :
Clarke Tate Manns Chinese.ai
Modified: trunk/gs/src/gxshade6.c
===================================================================
--- trunk/gs/src/gxshade6.c 2006-11-12 22:18:04 UTC (rev 7187)
+++ trunk/gs/src/gxshade6.c 2006-11-13 11:04:18 UTC (rev 7188)
@@ -151,8 +151,8 @@
pfs->smoothness = pfs->pis->smoothness;
pfs->color_stack_size = 0;
pfs->color_stack_step = 0;
+ pfs->color_stack_ptr = 0;
pfs->color_stack = NULL;
- pfs->color_stack_limit = NULL;
pfs->memory = NULL;
# if LAZY_WEDGES
code = wedge_vertex_list_elem_buffer_alloc(pfs);
@@ -1993,9 +1993,9 @@
dx1 = re.end.x - re.start.x;
dy1 = re.end.y - re.start.y;
if ((int64_t)dx0 * dy1 < (int64_t)dy0 * dx1)
- return ordered_triangle(pfs, &le, &re, &c);
+ return ordered_triangle(pfs, &le, &re, &cc);
else
- return ordered_triangle(pfs, &re, &le, &c);
+ return ordered_triangle(pfs, &re, &le, &cc);
}
pp = p0; p0 = p1; p1 = p2; p2 = pp;
}
More information about the gs-cvs
mailing list