From 47407aa6d9e2fb8f478585077ae124d50681f35d Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sat, 26 May 2018 00:19:22 +0100 Subject: [PATCH] VERSA: Fix XGP underline rectangle placement. The underline offset in XGP files is positive downwards (as opposed to the baseline offset, which is positive upwards!), and the ending Y position of the rectangle should be computed from the line width, not just the current position. --- src/dcp/versa.211 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/dcp/versa.211 b/src/dcp/versa.211 index ce3ff2bf..186fc608 100644 --- a/src/dcp/versa.211 +++ b/src/dcp/versa.211 @@ -4658,7 +4658,6 @@ undera: setzi b, ;relative to zero call xarg1s return add b,x ;baseline - movn b,b add b,xgp.y ;y top call xarg2 ;get length return @@ -4670,13 +4669,12 @@ doundr: ;b=y down, x=one x (not current), y=width, aos (p) ;if get this far, success skipn outena return ;don't do anything if not outputing - movsi x,(x) - addi y,(b) ; - movsi y,(y) - movs w,xgp.x - move z,xgp.y - sub z,basel - movsi z,(z) + movsi w,(w) ;to X + movsi x,(x) ;from X + move z,b + add z,y + movsi z,(z) ;to Y + movsi y,(b) ;from Y call plot"drect ;" return @@ -4686,7 +4684,7 @@ undenw: call xarg1 undend: movei a,2 call xarg1s return - movn b,x + move b,x add b,xgp.y move x,stubit move w,xgp.x