+bool SetOutlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)
+{
+ bool update = false;
+
+ if(controller)
+ {
+ switch(type)
+ {
+ case EffectStyle::DEFAULT:
+ {
+ const Property::Map& propertiesMap = value.Get<Property::Map>();
+
+ bool colorDefined = false;
+ Vector4 color;
+ bool widthDefined = false;
+ uint16_t width = 0u;
+ bool offsetDefined = false;
+ Vector2 offset;
+ bool blurRadiusDefined = false;
+ float blurRadius;
+
+ bool empty = true;
+
+ if(propertiesMap.Empty())
+ {
+ // Map empty so check if a string provided
+ // This is purely to maintain backward compatibility, but we don't parse the string to be a property map.
+ const std::string propertyString = value.Get<std::string>();
+
+ // Stores the default outline's properties string to be recovered by the GetOutlineProperties() function.
+ controller->SetDefaultOutlineProperties(propertyString);
+
+ controller->OutlineSetByString(true);
+ }
+ else
+ {
+ empty = ParseOutlineProperties(propertiesMap,
+ colorDefined,
+ color,
+ widthDefined,
+ width,
+ offsetDefined,
+ offset,
+ blurRadiusDefined,
+ blurRadius);
+
+ controller->OutlineSetByString(false);
+ }
+
+ if(!empty)
+ {
+ // Sets the default outline values.
+ if(colorDefined && (controller->GetOutlineColor() != color))
+ {
+ controller->SetOutlineColor(color);
+ update = true;
+ }
+
+ if(widthDefined && (controller->GetOutlineWidth() != width))
+ {
+ controller->SetOutlineWidth(width);
+ update = true;
+ }
+
+ if(offsetDefined && (controller->GetOutlineOffset() != offset))
+ {
+ controller->SetOutlineOffset(offset);
+ update = true;
+ }
+
+ if(blurRadiusDefined && (!Dali::Equals(controller->GetOutlineBlurRadius(), blurRadius)))
+ {
+ controller->SetOutlineBlurRadius(blurRadius);
+ update = true;
+ }
+ }
+ else
+ {
+ // Disable outline
+ if(0u != controller->GetOutlineWidth())
+ {
+ controller->SetOutlineWidth(0u);
+ update = true;
+ }
+ }
+ break;
+ }
+ case EffectStyle::INPUT:
+ {
+ const std::string& outlineProperties = value.Get<std::string>();
+
+ controller->SetInputOutlineProperties(outlineProperties);
+ break;
+ }
+ } // switch
+ } // if( controller )
+
+ return update;
+}
+
+void GetOutlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type)
+{
+ if(controller)
+ {
+ switch(type)
+ {
+ case EffectStyle::DEFAULT:
+ {
+ if(controller->IsOutlineSetByString())
+ {
+ value = controller->GetDefaultOutlineProperties();
+ break;
+ }
+ else
+ {
+ const Vector4& color = controller->GetOutlineColor();
+ const uint16_t width = controller->GetOutlineWidth();
+ const Vector2& offset = controller->GetOutlineOffset();
+ const float& blurRadius = controller->GetOutlineBlurRadius();
+
+ Property::Map map;
+ map.Insert(COLOR_KEY, color);
+ map.Insert(WIDTH_KEY, static_cast<int>(width));
+ map.Insert(OFFSET_KEY, offset);
+ map.Insert(BLUR_RADIUS_KEY, blurRadius);
+
+ value = map;
+
+ break;
+ }
+ }
+ case EffectStyle::INPUT:
+ {
+ value = controller->GetInputOutlineProperties();
+ break;
+ }
+ }
+ }
+}
+
+bool SetBackgroundProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)