-
Notifications
You must be signed in to change notification settings - Fork 1
Text Rendering Overview
This page aims to give an explanation of how all the parts in rendering a TextSymbolizer play together. Only important functions and members are documented here.
- Black: Class dependencies
- Dashed: Pointers
- Solid: Members
- Red: Rendering dependencies
As its only property contains a pointer to a text_placements
object.
(Abstract class)
This object handles the management of all TextSymbolizer properties. It can be used as a base class for own objects which implement new processing semantics. Basically this class just makes sure a pointer of the right class is returned by the get_placement_info
call.
-
get_placement_info
: (Abstract function) Get a text_ placement_info object to use in rendering. The returned object creates a list of settings which is used to try to find a placement and stores all information that is generated by the placement finder.
This function usually is implemented as
{
return text_placement_info_ptr(new text_placement_info_XXX(this));
}
-
get_all_expressions
: Get a list of all expressions used in any placement. This function is used to collect attributes.
All properties are grouped into a class text_symbolizer_properties
accessible via public member properties
. They are used by subclasses as their default settings.
- text_placements_dummy Always takes the default value.
- text_placement_simple Parse a simple string and created placement based on this string.
- text_placement_list Take placements from a list
(Abstract class) Generate a possible placement and store results of placement_finder. This placement has first to be tested by placement_finder to verify it can actually be used.
- Constructor: Takes the parent text_placements object as a parameter to read defaults from it.
-
next
: (Abstact function) Get next placement. This function is also called before the first placement is tried. -
init
: Initialize values used by placement finder. These values are provided by the renderer and can't be derived from TextSymbolizer properties.
-
properties
: Properties actually used by placement finder and renderer. Values in here are modified each time next() is called. -
placements
: List oftext_path
s returned by placement finder. One for each placement. - Some values from the renderer.
- Values returned by placement_finder.
List of all characters and their positions and formats for a placement. Produced by placement_finder, consumed by the renderer.
Contains all text symbolizer properties which are directly related to text formating.
-
set_values_from_xml
: Load all values and also theprocessor
object from XML ptree. -
to_xml
: Save all values to XML ptree (but does not create a new parent node!).
Contains all text symbolizer properties. Also stores formating information and uses this to produce formated text for a given feature.
-
tree_
(format_tree()/set_format_tree()
): A tree offormating::node
s which contain text and formating information
-
from_xml
: Load all values and also theprocessor
object from XML ptree. -
to_xml
: Save all values to XML ptree (but does not create a new parent node!). -
get_all_expressions
: Get a list of all expressions used in any placement. This function is used to collect attributes. -
process
: Takes a feature and produces formated text as output. The outputprocessed_text
object has to be created by the caller and passed in for thread safety.