[mapserver-commits] r7139 - trunk/mapserver/rfc
svn at osgeo.org
svn at osgeo.org
Mon Dec 3 07:32:45 EST 2007
Author: tbonfort
Date: 2007-12-03 07:32:45 -0500 (Mon, 03 Dec 2007)
New Revision: 7139
Modified:
trunk/mapserver/rfc/ms-rfc-40.txt
Log:
fix indentation
Modified: trunk/mapserver/rfc/ms-rfc-40.txt
===================================================================
--- trunk/mapserver/rfc/ms-rfc-40.txt 2007-12-03 12:30:30 UTC (rev 7138)
+++ trunk/mapserver/rfc/ms-rfc-40.txt 2007-12-03 12:32:45 UTC (rev 7139)
@@ -18,7 +18,7 @@
------------------
A new keyword, for example MAXLEN is added to the label object, and interacts with the label WRAP parameter as follows:
- the wrap character specifies what character can be replaced by a newline (no change w.r.t. the current meaning). Probably the most usefull wrap character will become ' ' (i.e. the space character)
-- the MAXLEN value specifies the maximum number of characters that can compose a line before a newline is inserted. A value of 0 specifies the current "hard" wrapping. A positive value triggers wrapping at the WRAP character for lines longer than MAXLEN. A Negative value triggers wrapping than is allowed to break words, i.e. not necessarily at the WRAP character.
+ - the MAXLEN value specifies the maximum number of characters that can compose a line before a newline is inserted. A value of 0 specifies the current "hard" wrapping. A positive value triggers wrapping at the WRAP character for lines longer than MAXLEN. A Negative value triggers wrapping than is allowed to break words, i.e. not necessarily at the WRAP character.
The WRAP / MAXLEN combinations are summarized here:
@@ -42,14 +42,14 @@
I propose to use a more generic though less precise way of doing, by padding the text lines with space characters
to approximate indentation. The initial implementation will only rely on the number of characters in each
text line:
- * loop through text lines to find the line with the most characters l_max
- * pad all the other lines with (l_max - l_cur)/2 space characters
+* loop through text lines to find the line with the most characters l_max
+* pad all the other lines with (l_max - l_cur)/2 space characters
A more advanced implementation could be to use the exact line lengths as returned by the renderers with the
msGetLabelSize function:
- * compute the size in pixels of the " " string (two spaces, accounts for kerning): l_2space
- * loop through text lines to longest line of length pix_l_max
- * pad all the other lines with (pix_l_max - pix_l_cur)/2 * 1/(2*l_2space) space characters
+* compute the size in pixels of the " " string (two spaces, accounts for kerning): l_2space
+* loop through text lines to longest line of length pix_l_max
+* pad all the other lines with (pix_l_max - pix_l_cur)/2 * 1/(2*l_2space) space characters
Limitations: aligning text to the right will produce ugly results using this method, unless using a
monospace font.
More information about the mapserver-commits
mailing list