diff options
| author | Manolo Gouy <Manolo> | 2011-02-15 13:48:06 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-15 13:48:06 +0000 |
| commit | 5d1669e2730d21e3f48739002619b3605c32ed23 (patch) | |
| tree | b103397d2e52b34632363c82bed3c6238824eef5 /src | |
| parent | f397c36c069b32ef5198e87166d30eb636b01e60 (diff) | |
Corrected PostScript show_pos_width procedure that writes text with pre-determined width:
division by length is replaced by division by (length/2 - 1), the correct value.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8424 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_PostScript.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx index 75cc987fe..92ad12491 100644 --- a/src/Fl_PostScript.cxx +++ b/src/Fl_PostScript.cxx @@ -268,7 +268,8 @@ static const char * prolog = // show at position with desired width // usage: // width (string) x y show_pos_width -"/show_pos_width {GS moveto dup dup stringwidth pop exch length exch 3 index exch sub exch " +"/show_pos_width {GS moveto dup dup stringwidth pop exch length 2 div 1 sub dup 0 eq {pop 1} if " +"exch 3 index exch sub exch " "div 0 2 index 1 -1 scale ashow pop pop GR} bind def\n" // spacing altered to match desired width //"/show_pos_width {GS moveto dup stringwidth pop 3 2 roll exch div -1 matrix scale concat " //"show GR } bind def\n" // horizontally scaled text to match desired width |
