*/
// EXTERNAL INCLUDES
+#include <dali/public-api/math/math-utils.h>
#include <dali/public-api/math/vector4.h>
namespace Dali
{
//The property is similar when both are not defined or when both are defined and have the same value.
return ((!colorDefined && !other.colorDefined) || ((colorDefined && other.colorDefined) && (color == other.color))) &&
- ((!heightDefined && !other.heightDefined) || ((heightDefined && other.heightDefined) && (height == other.height)));
+ ((!heightDefined && !other.heightDefined) || ((heightDefined && other.heightDefined) && (Dali::Equals(height, other.height))));
}
bool operator!=(const StrikethroughStyleProperties& other) const
bool IsHeightEqualTo(const StrikethroughStyleProperties& other) const
{
- return ((!heightDefined && !other.heightDefined) || ((heightDefined && other.heightDefined) && (height == other.height)));
+ return ((!heightDefined && !other.heightDefined) || ((heightDefined && other.heightDefined) && (Dali::Equals(height, other.height))));
+ }
+
+ StrikethroughStyleProperties& CopyIfNotDefined(const StrikethroughStyleProperties& other)
+ {
+ //Copy only the defined properties in other and not defined in this from other to this
+
+ if(!heightDefined && other.heightDefined)
+ {
+ height = other.height;
+ heightDefined = true;
+ }
+
+ if(!colorDefined && other.colorDefined)
+ {
+ color = other.color;
+ colorDefined = true;
+ }
+
+ // to chain this method
+ return *this;
+ }
+
+ StrikethroughStyleProperties& OverrideByDefinedProperties(const StrikethroughStyleProperties& other)
+ {
+ //Copy only the defined properties in other from other to this
+
+ if(other.heightDefined)
+ {
+ height = other.height;
+ heightDefined = true;
+ }
+
+ if(other.colorDefined)
+ {
+ color = other.color;
+ colorDefined = true;
+ }
+
+ // to chain this method
+ return *this;
}
//Attributes