summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-09-26 20:31:50 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-09-26 20:31:50 (GMT)
commit887179510d198cb0a129fef6959638ab75eec1be (patch)
treefdd5074c53bc03254e3447fbde5112cd06c75a2b
parent8ae29328c9c05cd5a901c12e64dbe067a3d0b598 (diff)
downloadblt-887179510d198cb0a129fef6959638ab75eec1be.zip
blt-887179510d198cb0a129fef6959638ab75eec1be.tar.gz
blt-887179510d198cb0a129fef6959638ab75eec1be.tar.bz2
fix ps rotated text issuev3.2.19
-rw-r--r--generic/tkbltGrPSOutput.C11
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkbltGrPSOutput.C b/generic/tkbltGrPSOutput.C
index 01a3101..155a723 100644
--- a/generic/tkbltGrPSOutput.C
+++ b/generic/tkbltGrPSOutput.C
@@ -732,6 +732,9 @@ void PSOutput::prolog()
" /yoffset exch def\n"
" /xoffset exch def\n"
" /strings exch def\n"
+" /yy exch def\n"
+" /xx exch def\n"
+" /rr exch def\n"
" % Compute the baseline offset and the actual font height.\n"
" 0 0 moveto baselineSampler false charpath\n"
" pathbbox dup /baseline exch def\n"
@@ -749,12 +752,14 @@ void PSOutput::prolog()
" strings length height mul /hh exch def\n"
" newpath\n"
" % Translate to x,y\n"
-" translate\n"
+" xx yy translate\n"
" % Translate to offset\n"
-" ww xoffset mul hh yoffset mul translate\n"
+" xoffset rr cos mul yoffset rr sin mul add /xxo exch def\n"
+" xoffset rr sin mul neg yoffset rr cos mul add /yyo exch def\n"
+" ww xxo mul hh yyo mul translate\n"
" % rotate\n"
" ww 2 div hh 2 div translate\n"
-" neg rotate\n"
+" rr neg rotate\n"
" ww -2 div hh -2 div translate\n"
" % Translate to justify and baseline\n"
" justify ww mul baseline translate\n"