Author: manolo
Date: 2011-02-15 05:48:06 -0800 (Tue, 15 Feb 2011)
New Revision: 8424
Log:
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.
Modified:
branches/branch-1.3/src/Fl_PostScript.cxx
Modified: branches/branch-1.3/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-1.3/src/Fl_PostScript.cxx 2011-02-15 09:29:43 UTC (rev
8423)
+++ branches/branch-1.3/src/Fl_PostScript.cxx 2011-02-15 13:48:06 UTC (rev
8424)
@@ -268,7 +268,8 @@
// 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
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit