osgEarth 2.1.1
Public Member Functions

KML_PolyStyle Struct Reference

Inheritance diagram for KML_PolyStyle:
Collaboration diagram for KML_PolyStyle:

List of all members.

Public Member Functions

virtual void scan (const Config &conf, Style &style)

Detailed Description

Definition at line 26 of file KML_PolyStyle.


Member Function Documentation

void KML_PolyStyle::scan ( const Config conf,
Style style 
) [virtual]

Definition at line 22 of file KML_PolyStyle.cpp.

{
    if ( !conf.empty() )
    {
        bool fill = true;
        if ( conf.hasValue("fill") ) {
            fill = as<int>(conf.value("fill"), 1) == 1;
        }

        bool outline = false;
        if ( conf.hasValue("outline") ) {
            outline = as<int>(conf.value("outline"), 0) == 1;
        }

        Color color(Color::White);
        if ( conf.hasValue("color") ) {
            color = Color( Stringify() << "#" << conf.value("color"), Color::ABGR );
        }

        if ( fill ) {
            PolygonSymbol* poly = style.getOrCreate<PolygonSymbol>();
            poly->fill()->color() = color;
        }
        else {
            LineSymbol* line = style.getOrCreate<LineSymbol>();
            line->stroke()->color() = color;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines