|
osgEarth 2.1.1
|
Inheritance diagram for osgEarth::Symbology::TextSymbol:
Collaboration diagram for osgEarth::Symbology::TextSymbol:Symbol that describes how to render text labels.
Definition at line 33 of file TextSymbol.
Definition at line 41 of file TextSymbol.
Definition at line 47 of file TextSymbol.
Definition at line 36 of file TextSymbol.
Definition at line 24 of file TextSymbol.cpp.
: Symbol( conf ), _fill( Fill( 1, 1, 1, 1 ) ), _halo( Stroke( 0.3, 0.3, 0.3, 1) ), _size( 16.0f ), _sizeMode( SIZEMODE_SCREEN ), _rotateToScreen( false ), _removeDuplicateLabels( false ), _provider( "overlay" ) { mergeConfig(conf); }
Here is the call graph for this function:| optional<StringExpression>& osgEarth::Symbology::TextSymbol::content | ( | ) | [inline] |
Actual text to render (if applicable)
Definition at line 67 of file TextSymbol.
{ return _content; }
Here is the caller graph for this function:| const optional<StringExpression>& osgEarth::Symbology::TextSymbol::content | ( | ) | const [inline] |
Definition at line 68 of file TextSymbol.
{ return _content; }
Definition at line 56 of file TextSymbol.
{ return _fill; }
Text fill color.
Definition at line 55 of file TextSymbol.
{ return _fill; }
Here is the caller graph for this function:| optional<std::string>& osgEarth::Symbology::TextSymbol::font | ( | ) | [inline] |
Name of text font.
Definition at line 63 of file TextSymbol.
{ return _font; }
Here is the caller graph for this function:| const optional<std::string>& osgEarth::Symbology::TextSymbol::font | ( | ) | const [inline] |
Definition at line 64 of file TextSymbol.
{ return _font; }
| Config TextSymbol::getConfig | ( | ) | const [virtual] |
Reimplemented from osgEarth::Symbology::Symbol.
Definition at line 38 of file TextSymbol.cpp.
{
Config conf = Symbol::getConfig();
conf.key() = "text";
conf.addObjIfSet( "fill", _fill );
conf.addObjIfSet( "halo", _halo );
conf.addIfSet( "font", _font );
conf.addIfSet( "size", _size );
conf.addObjIfSet( "content", _content );
conf.addObjIfSet( "priority", _priority );
conf.addIfSet( "rotate_to_screen", _rotateToScreen );
conf.addIfSet( "remove_duplicate_labels", _removeDuplicateLabels );
conf.addIfSet( "size_mode", "screen", _sizeMode, SIZEMODE_SCREEN );
conf.addIfSet( "size_mode", "object", _sizeMode, SIZEMODE_OBJECT );
conf.addIfSet( "line_orientation", "parallel", _lineOrientation, LINEORIENTATION_PARALLEL );
conf.addIfSet( "line_orientation", "perpendicular", _lineOrientation, LINEORIENTATION_PERPENDICULAR );
conf.addIfSet( "line_orientation", "horizontal", _lineOrientation, LINEORIENTATION_HORIZONTAL );
conf.addIfSet( "line_placement", "along_line", _linePlacement, LINEPLACEMENT_ALONG_LINE );
conf.addIfSet( "line_placement", "centroid", _linePlacement, LINEPLACEMENT_CENTROID );
conf.addIfSet( "provider", _provider );
conf.addIfSet( "theme", _theme );
if ( _pixelOffset.isSet() ) {
conf.add( "pixel_offset_x", toString(_pixelOffset->x()) );
conf.add( "pixel_offset_y", toString(_pixelOffset->y()) );
}
return conf;
}
Here is the call graph for this function:Definition at line 60 of file TextSymbol.
{ return _halo; }
Text outline color.
Definition at line 59 of file TextSymbol.
{ return _halo; }
Here is the caller graph for this function:| optional<LineOrientation>& osgEarth::Symbology::TextSymbol::lineOrientation | ( | ) | [inline] |
Definition at line 95 of file TextSymbol.
{ return _lineOrientation; }
Here is the caller graph for this function:| const optional<LineOrientation>& osgEarth::Symbology::TextSymbol::lineOrientation | ( | ) | const [inline] |
Definition at line 96 of file TextSymbol.
{ return _lineOrientation; }
| optional<LinePlacement>& osgEarth::Symbology::TextSymbol::linePlacement | ( | ) | [inline] |
Whether to render text relative to line data
Definition at line 99 of file TextSymbol.
{ return _linePlacement; }
Here is the caller graph for this function:| const optional<LinePlacement>& osgEarth::Symbology::TextSymbol::linePlacement | ( | ) | const [inline] |
Definition at line 100 of file TextSymbol.
{ return _linePlacement; }
| void TextSymbol::mergeConfig | ( | const Config & | conf | ) | [virtual] |
Definition at line 93 of file Style.cpp.
{
if ( _name.empty() )
_name = conf.value( "name" );
// if there's no explicit name, use the KEY as the name.
if ( _name.empty() )
_name = conf.key();
conf.getIfSet( "url", _uri ); // named "url" for back compat
_origType = conf.value( "type" );
if ( conf.value( "type" ) == "text/css" )
{
_origData = conf.value();
}
else
{
Config symbolConf = conf.child( "symbols" );
if ( !symbolConf.empty() )
{
for( ConfigSet::const_iterator i = symbolConf.children().begin(); i != symbolConf.children().end(); ++i )
{
const Config& c = *i;
if ( c.key() == "text" )
{
getOrCreateSymbol<TextSymbol>()->mergeConfig( c );
}
else if ( c.key() == "point" )
{
getOrCreateSymbol<PointSymbol>()->mergeConfig( c );
}
else if ( c.key() == "line" )
{
getOrCreateSymbol<LineSymbol>()->mergeConfig( c );
}
else if ( c.key() == "polygon" )
{
getOrCreateSymbol<PolygonSymbol>()->mergeConfig( c );
}
else if ( c.key() == "extrusion" )
{
getOrCreateSymbol<ExtrusionSymbol>()->mergeConfig( c );
}
else if ( c.key() == "altitude" )
{
getOrCreateSymbol<AltitudeSymbol>()->mergeConfig( c );
}
else if ( c.key() == "marker" )
{
getOrCreateSymbol<MarkerSymbol>()->mergeConfig( c );
}
}
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| const optional<osg::Vec2s>& osgEarth::Symbology::TextSymbol::pixelOffset | ( | ) | const [inline] |
Definition at line 84 of file TextSymbol.
{ return _pixelOffset; }
| optional<osg::Vec2s>& osgEarth::Symbology::TextSymbol::pixelOffset | ( | ) | [inline] |
Pixel offset from the center point.
Definition at line 83 of file TextSymbol.
{ return _pixelOffset; }
| optional<NumericExpression>& osgEarth::Symbology::TextSymbol::priority | ( | ) | [inline] |
Priority of the label (applicable when the renderer sorts labels)
Definition at line 71 of file TextSymbol.
{ return _priority; }
Here is the caller graph for this function:| const optional<NumericExpression>& osgEarth::Symbology::TextSymbol::priority | ( | ) | const [inline] |
Definition at line 72 of file TextSymbol.
{ return _priority; }
| optional<std::string>& osgEarth::Symbology::TextSymbol::provider | ( | ) | [inline] |
Label generation provider to use
Definition at line 103 of file TextSymbol.
{ return _provider; }
Here is the caller graph for this function:| const optional<std::string>& osgEarth::Symbology::TextSymbol::provider | ( | ) | const [inline] |
Definition at line 104 of file TextSymbol.
{ return _provider; }
| const optional<bool>& osgEarth::Symbology::TextSymbol::removeDuplicateLabels | ( | ) | const [inline] |
Definition at line 88 of file TextSymbol.
{ return _removeDuplicateLabels; }
| optional<bool>& osgEarth::Symbology::TextSymbol::removeDuplicateLabels | ( | ) | [inline] |
Whether to remove duplicates when drawing multiple labels.
Definition at line 87 of file TextSymbol.
{ return _removeDuplicateLabels; }
Here is the caller graph for this function:| const optional<bool>& osgEarth::Symbology::TextSymbol::rotateToScreen | ( | ) | const [inline] |
Definition at line 80 of file TextSymbol.
{ return _rotateToScreen; }
| optional<bool>& osgEarth::Symbology::TextSymbol::rotateToScreen | ( | ) | [inline] |
Whether the text should face the screen (be 2D)
Definition at line 79 of file TextSymbol.
{ return _rotateToScreen; }
Here is the caller graph for this function:| const optional<float>& osgEarth::Symbology::TextSymbol::size | ( | ) | const [inline] |
Definition at line 76 of file TextSymbol.
{ return _size; }
| optional<float>& osgEarth::Symbology::TextSymbol::size | ( | ) | [inline] |
Font size.
Definition at line 75 of file TextSymbol.
{ return _size; }
Here is the caller graph for this function:Whether the size() property refers to pixels or scene units
Definition at line 91 of file TextSymbol.
{ return _sizeMode; }
Here is the caller graph for this function:Definition at line 92 of file TextSymbol.
{ return _sizeMode; }
Definition at line 115 of file TextSymbol.
optional<Fill> osgEarth::Symbology::TextSymbol::_fill [protected] |
Definition at line 111 of file TextSymbol.
optional<std::string> osgEarth::Symbology::TextSymbol::_font [protected] |
Definition at line 113 of file TextSymbol.
optional<Stroke> osgEarth::Symbology::TextSymbol::_halo [protected] |
Definition at line 112 of file TextSymbol.
Definition at line 120 of file TextSymbol.
Definition at line 121 of file TextSymbol.
optional<osg::Vec2s> osgEarth::Symbology::TextSymbol::_pixelOffset [protected] |
Definition at line 123 of file TextSymbol.
Definition at line 116 of file TextSymbol.
optional<std::string> osgEarth::Symbology::TextSymbol::_provider [protected] |
Definition at line 124 of file TextSymbol.
optional<bool> osgEarth::Symbology::TextSymbol::_removeDuplicateLabels [protected] |
Definition at line 118 of file TextSymbol.
optional<bool> osgEarth::Symbology::TextSymbol::_rotateToScreen [protected] |
Definition at line 117 of file TextSymbol.
optional<float> osgEarth::Symbology::TextSymbol::_size [protected] |
Definition at line 114 of file TextSymbol.
optional<SizeMode> osgEarth::Symbology::TextSymbol::_sizeMode [protected] |
Definition at line 119 of file TextSymbol.
optional<std::string> osgEarth::Symbology::TextSymbol::_theme [protected] |
Definition at line 122 of file TextSymbol.
1.7.3