+const std::string COLOR_KEY("color");
+const std::string OFFSET_KEY("offset");
+const std::string BLUR_RADIUS_KEY("blurRadius");
+const std::string WIDTH_KEY("width");
+const std::string HEIGHT_KEY("height");
+const std::string ENABLE_KEY("enable");
+const std::string TYPE_KEY("type");
+const std::string DASH_WIDTH_KEY("dashWidth");
+const std::string DASH_GAP_KEY("dashGap");
+const std::string TRUE_TOKEN("true");
+const std::string FALSE_TOKEN("false");
+} // namespace
+
+bool ParseShadowProperties(const Property::Map& shadowPropertiesMap,
+ bool& colorDefined,
+ Vector4& color,
+ bool& offsetDefined,
+ Vector2& offset,
+ bool& blurRadiusDefined,
+ float& blurRadius)
+{
+ 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((DevelText::Shadow::Property::COLOR == valueGet.first.indexKey) || (COLOR_KEY == valueGet.first.stringKey))
+ {
+ /// Color key.
+ colorDefined = true;
+
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string colorStr = valueGet.second.Get<std::string>();
+ Text::ColorStringToVector4(colorStr.c_str(), colorStr.size(), color);
+ }
+ else
+ {
+ color = valueGet.second.Get<Vector4>();
+ }
+ }
+ else if((DevelText::Shadow::Property::OFFSET == valueGet.first.indexKey) || (OFFSET_KEY == valueGet.first.stringKey))
+ {
+ /// Offset key.
+ offsetDefined = true;
+
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string offsetStr = valueGet.second.Get<std::string>();
+ StringToVector2(offsetStr.c_str(), offsetStr.size(), offset);
+ }
+ else
+ {
+ offset = valueGet.second.Get<Vector2>();
+ }
+ }
+ else if((DevelText::Shadow::Property::BLUR_RADIUS == valueGet.first.indexKey) || (BLUR_RADIUS_KEY == valueGet.first.stringKey))
+ {
+ /// Blur radius key.
+ blurRadiusDefined = true;
+
+ if(valueGet.second.GetType() == Dali::Property::STRING)
+ {
+ const std::string blurRadiusStr = valueGet.second.Get<std::string>();
+ blurRadius = StringToFloat(blurRadiusStr.c_str());
+ }
+ else
+ {
+ blurRadius = valueGet.second.Get<float>();
+ }
+ }
+ }
+
+ return 0u == numberOfItems;