/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
.Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
.Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
- .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO );
+ .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) )
+ .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) );
mVisual.SetTransformAndSize( transformMap, size );
}
bool IsTransformProperty( const std::string& property )
{
- const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetSizeMode" };
+ const char* transformProperties[]= { "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" };
const int NUM_TRANSFORM_PROPERTIES = sizeof( transformProperties ) / sizeof( const char * );
bool found=false;
{
// Pseudo code
// foreach animator in transitionData
- // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetSizeMode" ]
+ // if animator{"property"} in [ "size", "offset", "origin", "anchorPoint", "offsetPolicy", "sizePolicy" ]
// transforms{ animator{"target"} }->{animator{"property"}} = animator{"targetValue"}
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
}
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
"transform":{
"size":[0.12, 0.37],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
},
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
"transform":{
"size":[0.09, 0.28],
"offset":[30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_BEGIN",
"anchorPoint":"CENTER_BEGIN"
}
"transform":{
"size":[0.9, 0.9],
"offset":[-30,0],
- "offsetSizeMode":[1,1,0,0],
+ "offsetPolicy":["ABSOLUTE", "ABSOLUTE"],
+ "sizePolicy":["RELATIVE", "RELATIVE"],
"origin":"CENTER_END",
"anchorPoint":"CENTER_END"
}