+const std::string WIDTH_KEY( "width" );
+const std::string HEIGHT_KEY( "height" );
+const std::string ENABLE_KEY( "enable" );
+const std::string TRUE_TOKEN( "true" );
+const std::string FALSE_TOKEN( "false" );
+}
+
+bool ParseShadowProperties( const Property::Map& shadowPropertiesMap,
+ bool& colorDefined,
+ Vector4& color,
+ bool& offsetDefined,
+ Vector2& offset )
+{
+ const unsigned int numberOfItems = shadowPropertiesMap.Count();
+
+ // Parses and applies the style.
+ for( unsigned int index = 0u; index < numberOfItems; ++index )
+ {
+ const KeyValuePair& valueGet = shadowPropertiesMap.GetKeyValue( index );
+
+ if( COLOR_KEY == valueGet.first.stringKey )
+ {
+ /// Color key.
+ colorDefined = true;
+
+ const std::string colorStr = valueGet.second.Get<std::string>();
+
+ Text::ColorStringToVector4( colorStr.c_str(), colorStr.size(), color );
+ }
+ else if( OFFSET_KEY == valueGet.first.stringKey )
+ {
+ /// Offset key.
+ offsetDefined = true;
+
+ const std::string offsetStr = valueGet.second.Get<std::string>();
+
+ StringToVector2( offsetStr.c_str(), offsetStr.size(), offset );
+ }
+ }
+
+ return 0u == numberOfItems;
+}
+
+bool ParseUnderlineProperties( const Property::Map& underlinePropertiesMap,
+ bool& enabled,
+ bool& colorDefined,
+ Vector4& color,
+ bool& heightDefined,
+ float& height )
+{
+ const unsigned int numberOfItems = underlinePropertiesMap.Count();
+
+ // Parses and applies the style.
+ for( unsigned int index = 0u; index < numberOfItems; ++index )
+ {
+ const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue( index );
+
+ if( ENABLE_KEY == valueGet.first.stringKey )
+ {
+ /// Enable key.
+ const std::string enableStr = valueGet.second.Get<std::string>();
+ enabled = Text::TokenComparison( TRUE_TOKEN, enableStr.c_str(), enableStr.size() );
+ }
+ else if( COLOR_KEY == valueGet.first.stringKey )
+ {
+ /// Color key.
+ colorDefined = true;
+
+ const std::string colorStr = valueGet.second.Get<std::string>();
+
+ Text::ColorStringToVector4( colorStr.c_str(), colorStr.size(), color );
+ }
+ else if( HEIGHT_KEY == valueGet.first.stringKey )
+ {
+ /// Height key.
+ heightDefined = true;
+
+ const std::string heightStr = valueGet.second.Get<std::string>();
+
+ height = StringToFloat( heightStr.c_str() );
+ }
+ }
+
+ return 0u == numberOfItems;
+}
+
+bool ParseOutlineProperties( const Property::Map& underlinePropertiesMap,
+ bool& colorDefined,
+ Vector4& color,
+ bool& widthDefined,
+ float& width )
+{
+ const unsigned int numberOfItems = underlinePropertiesMap.Count();
+
+ // Parses and applies the style.
+ for( unsigned int index = 0u; index < numberOfItems; ++index )
+ {
+ const KeyValuePair& valueGet = underlinePropertiesMap.GetKeyValue( index );
+
+ if( COLOR_KEY == valueGet.first.stringKey )
+ {
+ /// Color key.
+ colorDefined = true;
+ color = valueGet.second.Get<Vector4>();
+ }
+ else if( WIDTH_KEY == valueGet.first.stringKey )
+ {
+ /// Width key.
+ widthDefined = true;
+ width = valueGet.second.Get<float>();
+ }
+ }
+
+ return 0u == numberOfItems;