Hello!
Last week I was working on finishing the text formating code.
After having a close look at placement_finder.cpp and considering
reimplementing it I decided it would work with only minor changes and so
kept it. Now each char has an associated set of properties which is passed
all the way through the formating and placement code till it reaches the
rendering code.
Rendering works now, but it is only implemented for AGG. I will implement
support for other renderers soon. This should not be a problem as I
reduced the complexity of the rendering function. (117 vs. 43 lines) Most
code that is common to all renders is now moved out of this function.
I also updated the TextSymbolizer documentation in the wiki
(http://trac.mapnik.org/wiki/TextSymbolizer) because some options were
undocumentend or wrong.
The new TextSymbolizer syntax looks like this:
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point"
dx="0" dy="8" fill="blue" >
'default color'<Format fill="red">' red text '</Format>[name]<Format
fill="green">' green'<Format bold="true" size="20">' large '</Format>'text
'</Format>'normal text again'
</TextSymbolizer>
name option is removed and all the text goes to the content section. While
I think my code should not be merged for mapnik2 to avoid further delays I
think a compatibility layer should be added.
So <TextSymbolizer name="abc" /> and <TextSymbolizer>abc</TextSymbolizer>
are both valid but the first one print a deprecation warning.
Hermann
_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel