+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 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);
+
+ 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;
+ }
+ }
+ 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();
+
+ Property::Map map;
+ map.Insert(COLOR_KEY, color);
+ map.Insert(WIDTH_KEY, static_cast<int>(width));
+
+ value = map;
+
+ break;
+ }
+ }
+ case EffectStyle::INPUT:
+ {
+ value = controller->GetInputOutlineProperties();
+ break;
+ }
+ }
+ }
+}
+
+bool SetBackgroundProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type)