[gs-cvs] rev 7494 - in trunk/gs: doc src

leonardo at ghostscript.com leonardo at ghostscript.com
Mon Dec 11 20:25:22 PST 2006


Author: leonardo
Date: 2006-12-11 20:25:21 -0800 (Mon, 11 Dec 2006)
New Revision: 7494

Modified:
   trunk/gs/doc/pscet_status.txt
   trunk/gs/src/gsdps1.c
Log:
Fix : A CPSI compatibility for 'rectstroke'.

DETAILS :

Debugged with CET 12-12.PS page 8, 10.

PLRM doesn't specify the contour starting point for 'rectstroke'
when the rectangle width and/or height is negative.
CPSI and the old Ghostscript appear to produce different results, 
which is important with dashing. The patch provides the CPSI
compatibility when CPSI_mode is true.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt	2006-12-12 02:43:40 UTC (rev 7493)
+++ trunk/gs/doc/pscet_status.txt	2006-12-12 04:25:21 UTC (rev 7494)
@@ -2347,10 +2347,7 @@
 
 12-12-1  OK	Minor differences in positions and character shapes - ADC
 
-12-12-10  AOK	Minor differences in short line patterns (dashes) around 20
-		in column 8.  Diferences between all three (CPSI, GS, Adobe)
-		Analyzed by Igor : The dashing of the rectangles must 
-		have the central symmetry. CPSI is wrong.
+12-12-10  OK	
 
 12-12-2  OK	Minor differences in positions and character shapes - ADC
 
@@ -2364,9 +2361,7 @@
 
 12-12-7  OK	Color corrected by rev 7172.
 
-12-12-8  AOK	Some differences in locations of dashed line patterns - ADC
-		Analyzed by Igor : The dashing of the rectangles must 
-		have the central symmetry. CPSI is wrong.
+12-12-8  OK	
 
 12-12-9  DIFF	A pattern phase difference. assign: Raph.
 

Modified: trunk/gs/src/gsdps1.c
===================================================================
--- trunk/gs/src/gsdps1.c	2006-12-12 02:43:40 UTC (rev 7493)
+++ trunk/gs/src/gsdps1.c	2006-12-12 04:25:21 UTC (rev 7494)
@@ -96,13 +96,24 @@
 int
 gs_rectappend(gs_state * pgs, const gs_rect * pr, uint count)
 {
+    extern bool CPSI_mode;
+
     for (; count != 0; count--, pr++) {
 	floatp px = pr->p.x, py = pr->p.y, qx = pr->q.x, qy = pr->q.y;
 	int code;
 
-	/* Ensure counter-clockwise drawing. */
-	if ((qx >= px) != (qy >= py))
-	    qx = px, px = pr->q.x;	/* swap x values */
+	if (CPSI_mode) {
+	    if (px > qx) {
+		px = qx; qx = pr->p.x;
+	    }
+	    if (py > qy) {
+		py = qy; qy = pr->p.y;
+	    }
+	} else {
+	    /* Ensure counter-clockwise drawing. */
+	    if ((qx >= px) != (qy >= py))
+		qx = px, px = pr->q.x;	/* swap x values */
+	}
 	if ((code = gs_moveto(pgs, px, py)) < 0 ||
 	    (code = gs_lineto(pgs, qx, py)) < 0 ||
 	    (code = gs_lineto(pgs, qx, qy)) < 0 ||



More information about the gs-cvs mailing list