Author: leonardo
Date: 2008-03-31 16:00:55 -0700 (Mon, 31 Mar 2008)
New Revision: 8614

Modified:
   trunk/gs/src/gxstroke.c
Log:
Fix (graphics) : Stroke width was wrong for short segments.

DETAILS :

Bug 689742 "Nearly missing dotted lines with anisotropic resolution".

Rather the bug title mentions anisotropic rendering, 
the problem appears with isotropic one as well.
The bottom of the problem is that the function width_is_thin
used the dash longitude to know its direction,
which gives an incorrect (zero) result 
for vertical segments of zero length.

That method became obsolete since revision 7706,
which intorduced the precise dash direction is a special data field.
Using it now for the right computation of the width.

EXPECTED DIFFERENCES :

012-05.ps at 72 dpi.


Modified: trunk/gs/src/gxstroke.c
===================================================================
--- trunk/gs/src/gxstroke.c	2008-03-28 16:30:25 UTC (rev 8613)
+++ trunk/gs/src/gxstroke.c	2008-03-31 23:00:55 UTC (rev 8614)
@@ -846,9 +846,9 @@
     fixed dx, dy, wx = plp->width.x, wy = plp->width.y;
 
     /* If the line is horizontal or vertical, things are easy. */
-    if ((dy = plp->e.p.y - plp->o.p.y) == 0)
+    if ((dy = plp->vector.y) == 0)
 	return any_abs(wy) < fixed_half;
-    if ((dx = plp->e.p.x - plp->o.p.x) == 0)
+    if ((dx = plp->vector.x) == 0)
 	return any_abs(wx) < fixed_half;
 
     /*

_______________________________________________
gs-cvs mailing list
gs-cvs@ghostscript.com
http://www.ghostscript.com/mailman/listinfo/gs-cvs
