Commit adf210149fc391c9176d667e43e8d8b5a429cb57

Authored by Adeel Kazmi
1 parent dc63a4c9

Updates following Visual Property Changes

Change-Id: Ie5d0a5aa32a0fcee1448f4fb69277d4476048fdd
com.samsung.dali-demo.xml
@@ -163,8 +163,8 @@ @@ -163,8 +163,8 @@
163 <ui-application appid="video-view.example" exec="/usr/apps/com.samsung.dali-demo/bin/video-view.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> 163 <ui-application appid="video-view.example" exec="/usr/apps/com.samsung.dali-demo/bin/video-view.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
164 <label>Video View</label> 164 <label>Video View</label>
165 </ui-application> 165 </ui-application>
166 - <ui-application appid="mesh-renderer.example" exec="/usr/apps/com.samsung.dali-demo/bin/mesh-renderer.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">  
167 - <label>Mesh Renderer</label> 166 + <ui-application appid="mesh-visual.example" exec="/usr/apps/com.samsung.dali-demo/bin/mesh-visual.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
  167 + <label>Mesh Visual</label>
168 </ui-application> 168 </ui-application>
169 <ui-application appid="primitive-shapes.example" exec="/usr/apps/com.samsung.dali-demo/bin/primitive-shapes.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true"> 169 <ui-application appid="primitive-shapes.example" exec="/usr/apps/com.samsung.dali-demo/bin/primitive-shapes.example" nodisplay="true" multiple="false" type="c++app" taskmanage="true">
170 <label>Primitive Shapes</label> 170 <label>Primitive Shapes</label>
demo/dali-demo.cpp
@@ -78,7 +78,7 @@ int DALI_EXPORT_API main(int argc, char **argv) @@ -78,7 +78,7 @@ int DALI_EXPORT_API main(int argc, char **argv)
78 demo.AddExample(Example("tilt.example", DALI_DEMO_STR_TITLE_TILT_SENSOR)); 78 demo.AddExample(Example("tilt.example", DALI_DEMO_STR_TITLE_TILT_SENSOR));
79 demo.AddExample(Example("effects-view.example", DALI_DEMO_STR_TITLE_EFFECTS_VIEW)); 79 demo.AddExample(Example("effects-view.example", DALI_DEMO_STR_TITLE_EFFECTS_VIEW));
80 demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE)); 80 demo.AddExample(Example("native-image-source.example", DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE));
81 - demo.AddExample(Example("mesh-renderer.example", DALI_DEMO_STR_TITLE_MESH_RENDERER)); 81 + demo.AddExample(Example("mesh-visual.example", DALI_DEMO_STR_TITLE_MESH_VISUAL));
82 demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES)); 82 demo.AddExample(Example("primitive-shapes.example", DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES));
83 83
84 demo.SortAlphabetically( true ); 84 demo.SortAlphabetically( true );
examples/dissolve-effect/dissolve-effect-example.cpp
@@ -91,13 +91,13 @@ Toolkit::ImageView CreateStageFillingImageView( const char * const imagePath ) @@ -91,13 +91,13 @@ Toolkit::ImageView CreateStageFillingImageView( const char * const imagePath )
91 Size stageSize = Stage::GetCurrent().GetSize(); 91 Size stageSize = Stage::GetCurrent().GetSize();
92 Toolkit::ImageView imageView = Toolkit::ImageView::New(); 92 Toolkit::ImageView imageView = Toolkit::ImageView::New();
93 Property::Map map; 93 Property::Map map;
94 - map["rendererType"] = "IMAGE";  
95 - map["url"] = imagePath;  
96 - map["desiredWidth"] = stageSize.x;  
97 - map["desiredHeight"] = stageSize.y;  
98 - map["fittingMode"] = "SCALE_TO_FILL";  
99 - map["samplingMode"] = "BOX_THEN_LINEAR";  
100 - map["synchronousLoading"] = true; 94 + map[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE;
  95 + map[Toolkit::ImageVisual::Property::URL] = imagePath;
  96 + map[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = stageSize.x;
  97 + map[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = stageSize.y;
  98 + map[Toolkit::ImageVisual::Property::FITTING_MODE] = FittingMode::SCALE_TO_FILL;
  99 + map[Toolkit::ImageVisual::Property::SAMPLING_MODE] = SamplingMode::BOX_THEN_LINEAR;
  100 + map[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
101 imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); 101 imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
102 102
103 return imageView; 103 return imageView;
examples/gradients/gradients-example.cpp
@@ -77,7 +77,7 @@ public: @@ -77,7 +77,7 @@ public:
77 77
78 // ---- Gradient for background 78 // ---- Gradient for background
79 79
80 - mGradientMap.Insert("rendererType", "GRADIENT"); 80 + mGradientMap.Insert( Visual::Property::TYPE, Visual::GRADIENT );
81 81
82 Property::Array stopOffsets; 82 Property::Array stopOffsets;
83 stopOffsets.PushBack( 0.0f ); 83 stopOffsets.PushBack( 0.0f );
@@ -85,7 +85,7 @@ public: @@ -85,7 +85,7 @@ public:
85 stopOffsets.PushBack( 0.6f ); 85 stopOffsets.PushBack( 0.6f );
86 stopOffsets.PushBack( 0.8f ); 86 stopOffsets.PushBack( 0.8f );
87 stopOffsets.PushBack( 1.0f ); 87 stopOffsets.PushBack( 1.0f );
88 - mGradientMap.Insert("stopOffset", stopOffsets ); 88 + mGradientMap.Insert( GradientVisual::Property::STOP_OFFSET, stopOffsets );
89 89
90 Property::Array stopColors; 90 Property::Array stopColors;
91 stopColors.PushBack( Vector4( 129.f, 198.f, 193.f, 255.f )/255.f ); 91 stopColors.PushBack( Vector4( 129.f, 198.f, 193.f, 255.f )/255.f );
@@ -93,7 +93,7 @@ public: @@ -93,7 +93,7 @@ public:
93 stopColors.PushBack( Vector4( 214.f, 37.f, 139.f, 191.f )/255.f ); 93 stopColors.PushBack( Vector4( 214.f, 37.f, 139.f, 191.f )/255.f );
94 stopColors.PushBack( Vector4( 129.f, 198.f, 193.f, 150.f )/255.f ); 94 stopColors.PushBack( Vector4( 129.f, 198.f, 193.f, 150.f )/255.f );
95 stopColors.PushBack( Color::YELLOW ); 95 stopColors.PushBack( Color::YELLOW );
96 - mGradientMap.Insert("stopColor", stopColors); 96 + mGradientMap.Insert( GradientVisual::Property::STOP_COLOR, stopColors );
97 97
98 OnChangeIconClicked( changeButton ); 98 OnChangeIconClicked( changeButton );
99 } 99 }
@@ -106,30 +106,30 @@ public: @@ -106,30 +106,30 @@ public:
106 { 106 {
107 case 0: // linear gradient with units as objectBoundingBox 107 case 0: // linear gradient with units as objectBoundingBox
108 { 108 {
109 - gradientMap.Insert("startPosition", Vector2( 0.5f, 0.5f ));  
110 - gradientMap.Insert("endPosition", Vector2( -0.5f, -0.5f )); 109 + gradientMap.Insert( GradientVisual::Property::START_POSITION, Vector2( 0.5f, 0.5f ) );
  110 + gradientMap.Insert( GradientVisual::Property::END_POSITION, Vector2( -0.5f, -0.5f ) );
111 break; 111 break;
112 } 112 }
113 case 1: // linear gradient with units as userSpaceOnUse 113 case 1: // linear gradient with units as userSpaceOnUse
114 { 114 {
115 Vector2 halfStageSize = Stage::GetCurrent().GetSize()*0.5f; 115 Vector2 halfStageSize = Stage::GetCurrent().GetSize()*0.5f;
116 - gradientMap.Insert("startPosition", halfStageSize);  
117 - gradientMap.Insert("endPosition", -halfStageSize );  
118 - gradientMap.Insert("units", "USER_SPACE"); 116 + gradientMap.Insert( GradientVisual::Property::START_POSITION, halfStageSize );
  117 + gradientMap.Insert( GradientVisual::Property::END_POSITION, -halfStageSize );
  118 + gradientMap.Insert( GradientVisual::Property::UNITS, GradientVisual::Units::USER_SPACE );
119 break; 119 break;
120 } 120 }
121 case 2: // radial gradient with units as objectBoundingBox 121 case 2: // radial gradient with units as objectBoundingBox
122 { 122 {
123 - gradientMap.Insert("center", Vector2(0.5f, 0.5f));  
124 - gradientMap.Insert("radius", 1.414f); 123 + gradientMap.Insert( GradientVisual::Property::CENTER, Vector2( 0.5f, 0.5f ) );
  124 + gradientMap.Insert( GradientVisual::Property::RADIUS, 1.414f );
125 break; 125 break;
126 } 126 }
127 default: // radial gradient with units as userSpaceOnUse 127 default: // radial gradient with units as userSpaceOnUse
128 { 128 {
129 Vector2 stageSize = Stage::GetCurrent().GetSize(); 129 Vector2 stageSize = Stage::GetCurrent().GetSize();
130 - gradientMap.Insert("center", stageSize*0.5f);  
131 - gradientMap.Insert("radius", stageSize.Length());  
132 - gradientMap.Insert("units", "USER_SPACE"); 130 + gradientMap.Insert( GradientVisual::Property::CENTER, stageSize * 0.5f );
  131 + gradientMap.Insert( GradientVisual::Property::RADIUS, stageSize.Length());
  132 + gradientMap.Insert( GradientVisual::Property::UNITS, GradientVisual::Units::USER_SPACE );
133 break; 133 break;
134 } 134 }
135 } 135 }
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
@@ -177,12 +177,12 @@ public: @@ -177,12 +177,12 @@ public:
177 177
178 // Background image: 178 // Background image:
179 Dali::Property::Map backgroundImage; 179 Dali::Property::Map backgroundImage;
180 - backgroundImage.Insert( "rendererType", "IMAGE" );  
181 - backgroundImage.Insert( "url", BACKGROUND_IMAGE );  
182 - backgroundImage.Insert( "desiredWidth", stage.GetSize().width );  
183 - backgroundImage.Insert( "desiredHeight", stage.GetSize().height );  
184 - backgroundImage.Insert( "fittingMode", "SCALE_TO_FILL" );  
185 - backgroundImage.Insert( "samplingMode", "BOX_THEN_NEAREST" ); 180 + backgroundImage.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
  181 + backgroundImage.Insert( Toolkit::ImageVisual::Property::URL, BACKGROUND_IMAGE );
  182 + backgroundImage.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, stage.GetSize().width );
  183 + backgroundImage.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, stage.GetSize().height );
  184 + backgroundImage.Insert( Toolkit::ImageVisual::Property::FITTING_MODE, FittingMode::SCALE_TO_FILL );
  185 + backgroundImage.Insert( Toolkit::ImageVisual::Property::SAMPLING_MODE, SamplingMode::BOX_THEN_NEAREST );
186 186
187 Toolkit::ImageView background = Toolkit::ImageView::New(); 187 Toolkit::ImageView background = Toolkit::ImageView::New();
188 background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage ); 188 background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage );
examples/item-view/item-view-example.cpp
@@ -878,10 +878,10 @@ public: // From ItemFactory @@ -878,10 +878,10 @@ public: // From ItemFactory
878 borderActor.SetColorMode( USE_PARENT_COLOR ); 878 borderActor.SetColorMode( USE_PARENT_COLOR );
879 879
880 Property::Map borderProperty; 880 Property::Map borderProperty;
881 - borderProperty.Insert( "rendererType", "BORDER" );  
882 - borderProperty.Insert( "borderColor", Color::WHITE );  
883 - borderProperty.Insert( "borderSize", ITEM_BORDER_SIZE );  
884 - borderProperty.Insert( "antiAliasing", true ); 881 + borderProperty.Insert( Visual::Property::TYPE, Visual::BORDER );
  882 + borderProperty.Insert( BorderVisual::Property::COLOR, Color::WHITE );
  883 + borderProperty.Insert( BorderVisual::Property::SIZE, ITEM_BORDER_SIZE );
  884 + borderProperty.Insert( BorderVisual::Property::ANTI_ALIASING, true );
885 borderActor.SetProperty( ImageView::Property::IMAGE, borderProperty ); 885 borderActor.SetProperty( ImageView::Property::IMAGE, borderProperty );
886 886
887 actor.Add(borderActor); 887 actor.Add(borderActor);
@@ -902,8 +902,8 @@ public: // From ItemFactory @@ -902,8 +902,8 @@ public: // From ItemFactory
902 checkbox.SetZ( 0.1f ); 902 checkbox.SetZ( 0.1f );
903 903
904 Property::Map solidColorProperty; 904 Property::Map solidColorProperty;
905 - solidColorProperty.Insert( "rendererType", "COLOR" );  
906 - solidColorProperty.Insert( "mixColor", Vector4(0.f, 0.f, 0.f, 0.6f) ); 905 + solidColorProperty.Insert( Visual::Property::TYPE, Visual::COLOR );
  906 + solidColorProperty.Insert( ColorVisual::Property::MIX_COLOR, Vector4(0.f, 0.f, 0.f, 0.6f) );
907 checkbox.SetProperty( ImageView::Property::IMAGE, solidColorProperty ); 907 checkbox.SetProperty( ImageView::Property::IMAGE, solidColorProperty );
908 908
909 if( MODE_REMOVE_MANY != mMode && 909 if( MODE_REMOVE_MANY != mMode &&
examples/mesh-renderer/mesh-renderer-example.cpp renamed to examples/mesh-visual/mesh-visual-example.cpp
@@ -9,7 +9,7 @@ namespace @@ -9,7 +9,7 @@ namespace
9 //Keeps information about each model for access. 9 //Keeps information about each model for access.
10 struct Model 10 struct Model
11 { 11 {
12 - Control control; // Control housing the mesh renderer of the model. 12 + Control control; // Control housing the mesh visual of the model.
13 Vector2 rotation; // Keeps track of rotation about x and y axis for manual rotation. 13 Vector2 rotation; // Keeps track of rotation about x and y axis for manual rotation.
14 Animation rotationAnimation; // Automatically rotates when left alone. 14 Animation rotationAnimation; // Automatically rotates when left alone.
15 }; 15 };
@@ -31,12 +31,12 @@ namespace @@ -31,12 +31,12 @@ namespace
31 31
32 const char * const TEXTURES_PATH( DEMO_IMAGE_DIR "" ); 32 const char * const TEXTURES_PATH( DEMO_IMAGE_DIR "" );
33 33
34 - //Possible shader options.  
35 - const char * const SHADER_TYPE[] = 34 + //Possible shading modes.
  35 + MeshVisual::ShadingMode::Value SHADING_MODE_TABLE[] =
36 { 36 {
37 - "ALL_TEXTURES",  
38 - "DIFFUSE_TEXTURE",  
39 - "TEXTURELESS" 37 + MeshVisual::ShadingMode::TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING,
  38 + MeshVisual::ShadingMode::TEXTURED_WITH_SPECULAR_LIGHTING,
  39 + MeshVisual::ShadingMode::TEXTURELESS_WITH_DIFFUSE_LIGHTING
40 }; 40 };
41 41
42 //Files for background and toolbar 42 //Files for background and toolbar
@@ -54,23 +54,23 @@ namespace @@ -54,23 +54,23 @@ namespace
54 54
55 } //End namespace 55 } //End namespace
56 56
57 -class MeshRendererController : public ConnectionTracker 57 +class MeshVisualController : public ConnectionTracker
58 { 58 {
59 public: 59 public:
60 60
61 - MeshRendererController( Application& application ) 61 + MeshVisualController( Application& application )
62 : mApplication( application ), //Store handle to the application. 62 : mApplication( application ), //Store handle to the application.
63 mModelIndex( 1 ), //Start with metal robot. 63 mModelIndex( 1 ), //Start with metal robot.
64 - mShaderIndex( 0 ), //Start with all textures. 64 + mShadingModeIndex( 0 ), //Start with textured with detailed specular lighting.
65 mTag( -1 ), //Non-valid default, which will get set to a correct value when used. 65 mTag( -1 ), //Non-valid default, which will get set to a correct value when used.
66 mSelectedModelIndex( -1 ), //Non-valid default, which will get set to a correct value when used. 66 mSelectedModelIndex( -1 ), //Non-valid default, which will get set to a correct value when used.
67 mPaused( false ) //Animations play by default. 67 mPaused( false ) //Animations play by default.
68 { 68 {
69 // Connect to the Application's Init signal 69 // Connect to the Application's Init signal
70 - mApplication.InitSignal().Connect( this, &MeshRendererController::Create ); 70 + mApplication.InitSignal().Connect( this, &MeshVisualController::Create );
71 } 71 }
72 72
73 - ~MeshRendererController() 73 + ~MeshVisualController()
74 { 74 {
75 } 75 }
76 76
@@ -89,7 +89,7 @@ public: @@ -89,7 +89,7 @@ public:
89 LoadScene(); 89 LoadScene();
90 90
91 //Allow for exiting of the application via key presses. 91 //Allow for exiting of the application via key presses.
92 - stage.KeyEventSignal().Connect( this, &MeshRendererController::OnKeyEvent ); 92 + stage.KeyEventSignal().Connect( this, &MeshVisualController::OnKeyEvent );
93 } 93 }
94 94
95 //Sets up the on-screen elements. 95 //Sets up the on-screen elements.
@@ -105,10 +105,10 @@ public: @@ -105,10 +105,10 @@ public:
105 baseLayer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation. 105 baseLayer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
106 baseLayer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so. 106 baseLayer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
107 baseLayer.RegisterProperty( "Tag", LAYER_TAG ); //Used to differentiate between different kinds of actor. 107 baseLayer.RegisterProperty( "Tag", LAYER_TAG ); //Used to differentiate between different kinds of actor.
108 - baseLayer.TouchedSignal().Connect( this, &MeshRendererController::OnTouch ); 108 + baseLayer.TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
109 stage.Add( baseLayer ); 109 stage.Add( baseLayer );
110 110
111 - //Add containers to house each renderer-holding-actor. 111 + //Add containers to house each visual-holding-actor.
112 for( int i = 0; i < NUM_MESHES; i++ ) 112 for( int i = 0; i < NUM_MESHES; i++ )
113 { 113 {
114 mContainers[i] = Actor::New(); 114 mContainers[i] = Actor::New();
@@ -139,7 +139,7 @@ public: @@ -139,7 +139,7 @@ public:
139 mContainers[i].SetAnchorPoint( AnchorPoint::TOP_RIGHT ); 139 mContainers[i].SetAnchorPoint( AnchorPoint::TOP_RIGHT );
140 } 140 }
141 141
142 - mContainers[i].TouchedSignal().Connect( this, &MeshRendererController::OnTouch ); 142 + mContainers[i].TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
143 baseLayer.Add( mContainers[i] ); 143 baseLayer.Add( mContainers[i] );
144 } 144 }
145 145
@@ -174,7 +174,7 @@ public: @@ -174,7 +174,7 @@ public:
174 //Create button for model changing 174 //Create button for model changing
175 Toolkit::PushButton modelButton = Toolkit::PushButton::New(); 175 Toolkit::PushButton modelButton = Toolkit::PushButton::New();
176 modelButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); 176 modelButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
177 - modelButton.ClickedSignal().Connect( this, &MeshRendererController::OnChangeModelClicked ); 177 + modelButton.ClickedSignal().Connect( this, &MeshVisualController::OnChangeModelClicked );
178 modelButton.SetParentOrigin( Vector3( 0.05, 0.95, 0.5 ) ); //Offset from bottom left 178 modelButton.SetParentOrigin( Vector3( 0.05, 0.95, 0.5 ) ); //Offset from bottom left
179 modelButton.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); 179 modelButton.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
180 modelButton.SetLabelText( "Change Model" ); 180 modelButton.SetLabelText( "Change Model" );
@@ -183,7 +183,7 @@ public: @@ -183,7 +183,7 @@ public:
183 //Create button for shader changing 183 //Create button for shader changing
184 Toolkit::PushButton shaderButton = Toolkit::PushButton::New(); 184 Toolkit::PushButton shaderButton = Toolkit::PushButton::New();
185 shaderButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); 185 shaderButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
186 - shaderButton.ClickedSignal().Connect( this, &MeshRendererController::OnChangeShaderClicked ); 186 + shaderButton.ClickedSignal().Connect( this, &MeshVisualController::OnChangeShaderClicked );
187 shaderButton.SetParentOrigin( Vector3( 0.95, 0.95, 0.5 ) ); //Offset from bottom right 187 shaderButton.SetParentOrigin( Vector3( 0.95, 0.95, 0.5 ) ); //Offset from bottom right
188 shaderButton.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT ); 188 shaderButton.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
189 shaderButton.SetLabelText( "Change Shader" ); 189 shaderButton.SetLabelText( "Change Shader" );
@@ -192,7 +192,7 @@ public: @@ -192,7 +192,7 @@ public:
192 //Create button for pausing animations 192 //Create button for pausing animations
193 Toolkit::PushButton pauseButton = Toolkit::PushButton::New(); 193 Toolkit::PushButton pauseButton = Toolkit::PushButton::New();
194 pauseButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); 194 pauseButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
195 - pauseButton.ClickedSignal().Connect( this, &MeshRendererController::OnPauseClicked ); 195 + pauseButton.ClickedSignal().Connect( this, &MeshVisualController::OnPauseClicked );
196 pauseButton.SetParentOrigin( Vector3( 0.5, 0.95, 0.5 ) ); //Offset from bottom center 196 pauseButton.SetParentOrigin( Vector3( 0.5, 0.95, 0.5 ) ); //Offset from bottom center
197 pauseButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); 197 pauseButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
198 pauseButton.SetLabelText( " || " ); 198 pauseButton.SetLabelText( " || " );
@@ -211,8 +211,8 @@ public: @@ -211,8 +211,8 @@ public:
211 211
212 //Make white background. 212 //Make white background.
213 Property::Map lightMap; 213 Property::Map lightMap;
214 - lightMap.Insert( "rendererType", "COLOR" );  
215 - lightMap.Insert( "mixColor", Color::WHITE ); 214 + lightMap.Insert( Visual::Property::TYPE, Visual::COLOR );
  215 + lightMap.Insert( ColorVisual::Property::MIX_COLOR, Color::WHITE );
216 mLightSource.SetProperty( Control::Property::BACKGROUND, Property::Value( lightMap ) ); 216 mLightSource.SetProperty( Control::Property::BACKGROUND, Property::Value( lightMap ) );
217 217
218 //Label to show what this actor is for the user. 218 //Label to show what this actor is for the user.
@@ -225,7 +225,7 @@ public: @@ -225,7 +225,7 @@ public:
225 mLightSource.Add( lightLabel ); 225 mLightSource.Add( lightLabel );
226 226
227 //Connect to touch signal for dragging. 227 //Connect to touch signal for dragging.
228 - mLightSource.TouchedSignal().Connect( this, &MeshRendererController::OnTouch ); 228 + mLightSource.TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
229 229
230 //Place the light source on a layer above the base, so that it is rendered above everything else. 230 //Place the light source on a layer above the base, so that it is rendered above everything else.
231 Layer upperLayer = Layer::New(); 231 Layer upperLayer = Layer::New();
@@ -241,12 +241,12 @@ public: @@ -241,12 +241,12 @@ public:
241 { 241 {
242 //Create mesh property map 242 //Create mesh property map
243 Property::Map map; 243 Property::Map map;
244 - map.Insert( "rendererType", "MESH" );  
245 - map.Insert( "objectUrl", MODEL_FILE[mModelIndex] );  
246 - map.Insert( "materialUrl", MATERIAL_FILE[mModelIndex] );  
247 - map.Insert( "texturesPath", TEXTURES_PATH );  
248 - map.Insert( "shaderType", SHADER_TYPE[mShaderIndex] );  
249 - map.Insert( "useSoftNormals", false ); 244 + map.Insert( Visual::Property::TYPE, Visual::MESH );
  245 + map.Insert( MeshVisual::Property::OBJECT_URL, MODEL_FILE[mModelIndex] );
  246 + map.Insert( MeshVisual::Property::MATERIAL_URL, MATERIAL_FILE[mModelIndex] );
  247 + map.Insert( MeshVisual::Property::TEXTURES_PATH, TEXTURES_PATH );
  248 + map.Insert( MeshVisual::Property::SHADING_MODE, SHADING_MODE_TABLE[mShadingModeIndex] );
  249 + map.Insert( MeshVisual::Property::USE_SOFT_NORMALS, false );
250 250
251 //Set the two controls to use the mesh 251 //Set the two controls to use the mesh
252 for( int i = 0; i < NUM_MESHES; i++ ) 252 for( int i = 0; i < NUM_MESHES; i++ )
@@ -365,7 +365,7 @@ public: @@ -365,7 +365,7 @@ public:
365 //Cycle through the list of shaders. 365 //Cycle through the list of shaders.
366 bool OnChangeShaderClicked( Toolkit::Button button ) 366 bool OnChangeShaderClicked( Toolkit::Button button )
367 { 367 {
368 - ++mShaderIndex %= 3; 368 + ++mShadingModeIndex %= 3;
369 369
370 ReloadModel(); 370 ReloadModel();
371 371
@@ -429,26 +429,18 @@ private: @@ -429,26 +429,18 @@ private:
429 Vector2 mRotationStart; 429 Vector2 mRotationStart;
430 430
431 int mModelIndex; //Index of model to load. 431 int mModelIndex; //Index of model to load.
432 - int mShaderIndex; //Index of shader type to use. 432 + int mShadingModeIndex; //Index of shader type to use.
433 int mTag; //Identifies what kind of actor has been selected in OnTouch. 433 int mTag; //Identifies what kind of actor has been selected in OnTouch.
434 int mSelectedModelIndex; //Index of model selected on screen. 434 int mSelectedModelIndex; //Index of model selected on screen.
435 bool mPaused; //If true, all animations are paused and should stay so. 435 bool mPaused; //If true, all animations are paused and should stay so.
436 }; 436 };
437 437
438 -void RunTest( Application& application )  
439 -{  
440 - MeshRendererController test( application );  
441 -  
442 - application.MainLoop();  
443 -}  
444 -  
445 // Entry point for Linux & Tizen applications 438 // Entry point for Linux & Tizen applications
446 // 439 //
447 int main( int argc, char **argv ) 440 int main( int argc, char **argv )
448 { 441 {
449 Application application = Application::New( &argc, &argv ); 442 Application application = Application::New( &argc, &argv );
450 -  
451 - RunTest( application );  
452 - 443 + MeshVisualController test( application );
  444 + application.MainLoop();
453 return 0; 445 return 0;
454 } 446 }
examples/motion-blur/motion-blur-example.cpp
@@ -103,13 +103,13 @@ const float ORIENTATION_DURATION = 0.5f; ///&lt; Time to rotate to @@ -103,13 +103,13 @@ const float ORIENTATION_DURATION = 0.5f; ///&lt; Time to rotate to
103 void SetImageFittedInBox( ImageView& imageView, Property::Map& shaderEffect, const char * const imagePath, int maxWidth, int maxHeight ) 103 void SetImageFittedInBox( ImageView& imageView, Property::Map& shaderEffect, const char * const imagePath, int maxWidth, int maxHeight )
104 { 104 {
105 Property::Map map; 105 Property::Map map;
106 - map["rendererType"] = "IMAGE";  
107 - map["url"] = imagePath; 106 + map[Visual::Property::TYPE] = Visual::IMAGE;
  107 + map[ImageVisual::Property::URL] = imagePath;
108 // Load the image nicely scaled-down to fit within the specified max width and height: 108 // Load the image nicely scaled-down to fit within the specified max width and height:
109 - map["desiredWidth"] = maxWidth;  
110 - map["desiredHeight"] = maxHeight;  
111 - map["fittingMode"] = "SHRINK_TO_FIT";  
112 - map["samplingMode"] = "BOX_THEN_LINEAR"; 109 + map[ImageVisual::Property::DESIRED_WIDTH] = maxWidth;
  110 + map[ImageVisual::Property::DESIRED_HEIGHT] = maxHeight;
  111 + map[ImageVisual::Property::FITTING_MODE] = FittingMode::SHRINK_TO_FIT;
  112 + map[ImageVisual::Property::SAMPLING_MODE] = SamplingMode::BOX_THEN_LINEAR;
113 map.Merge( shaderEffect ); 113 map.Merge( shaderEffect );
114 114
115 imageView.SetProperty( ImageView::Property::IMAGE, map ); 115 imageView.SetProperty( ImageView::Property::IMAGE, map );
examples/primitive-shapes/primitive-shapes-example.cpp
@@ -19,15 +19,6 @@ namespace @@ -19,15 +19,6 @@ namespace
19 DEMO_IMAGE_DIR "octahedron-button.png" 19 DEMO_IMAGE_DIR "octahedron-button.png"
20 }; 20 };
21 21
22 - //Shape names  
23 - const char * const SHAPE_SPHERE = "SPHERE";  
24 - const char * const SHAPE_CONE = "CONE";  
25 - const char * const SHAPE_CONICAL_FRUSTRUM = "CONICAL_FRUSTRUM";  
26 - const char * const SHAPE_CYLINDER = "CYLINDER";  
27 - const char * const SHAPE_CUBE = "CUBE";  
28 - const char * const SHAPE_BEVELLED_CUBE = "BEVELLED_CUBE";  
29 - const char * const SHAPE_OCTAHEDRON = "OCTAHEDRON";  
30 -  
31 //Shape property defaults 22 //Shape property defaults
32 const int DEFAULT_SLICES = 32; 23 const int DEFAULT_SLICES = 32;
33 const int DEFAULT_STACKS = 32; 24 const int DEFAULT_STACKS = 32;
@@ -278,7 +269,7 @@ public: @@ -278,7 +269,7 @@ public:
278 // 269 //
279 void SetupModel( Layer layer ) 270 void SetupModel( Layer layer )
280 { 271 {
281 - //Create a container to house the renderer-holding actor, to provide a constant hitbox. 272 + //Create a container to house the visual-holding actor, to provide a constant hitbox.
282 Actor container = Actor::New(); 273 Actor container = Actor::New();
283 container.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); 274 container.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
284 container.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height. 275 container.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height.
@@ -309,7 +300,7 @@ public: @@ -309,7 +300,7 @@ public:
309 mPanGestureDetector.DetectedSignal().Connect( this, &PrimitiveShapesController::OnPan ); 300 mPanGestureDetector.DetectedSignal().Connect( this, &PrimitiveShapesController::OnPan );
310 } 301 }
311 302
312 - //Clears all sliders and resets the primitive renderer property map. 303 + //Clears all sliders and resets the primitive visual property map.
313 void InitialiseSlidersAndModel() 304 void InitialiseSlidersAndModel()
314 { 305 {
315 //Sliders 306 //Sliders
@@ -321,10 +312,10 @@ public: @@ -321,10 +312,10 @@ public:
321 mSliderLabels.at( i ).SetVisible( false ); 312 mSliderLabels.at( i ).SetVisible( false );
322 } 313 }
323 314
324 - //Renderer map for model  
325 - mRendererMap.Clear();  
326 - mRendererMap[ "rendererType" ] = "PRIMITIVE";  
327 - mRendererMap[ "shapeColor" ] = mColor; 315 + //Visual map for model
  316 + mVisualMap.Clear();
  317 + mVisualMap[ Visual::Property::TYPE ] = Visual::PRIMITIVE;
  318 + mVisualMap[ PrimitiveVisual::Property::COLOR ] = mColor;
328 } 319 }
329 320
330 //Sets the 3D model to a sphere and modifies the sliders appropriately. 321 //Sets the 3D model to a sphere and modifies the sliders appropriately.
@@ -332,19 +323,19 @@ public: @@ -332,19 +323,19 @@ public:
332 { 323 {
333 InitialiseSlidersAndModel(); 324 InitialiseSlidersAndModel();
334 325
335 - //Set up specific renderer properties.  
336 - mRendererMap[ "shape" ] = SHAPE_SPHERE;  
337 - mRendererMap[ "slices" ] = DEFAULT_SLICES;  
338 - mRendererMap[ "stacks" ] = DEFAULT_STACKS; 326 + //Set up specific visual properties.
  327 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE;
  328 + mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
  329 + mVisualMap[ PrimitiveVisual::Property::STACKS ] = DEFAULT_STACKS;
339 330
340 //Set up sliders. 331 //Set up sliders.
341 - SetupSlider( 0, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, "slices" ); 332 + SetupSlider( 0, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
342 SetupMarks( mSliders.at( 0 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND ); 333 SetupMarks( mSliders.at( 0 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
343 - SetupSlider( 1, STACKS_LOWER_BOUND, STACKS_UPPER_BOUND, DEFAULT_STACKS, "stacks" ); 334 + SetupSlider( 1, STACKS_LOWER_BOUND, STACKS_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::STACKS, "stacks" );
344 SetupMarks( mSliders.at( 1 ), STACKS_LOWER_BOUND, STACKS_UPPER_BOUND ); 335 SetupMarks( mSliders.at( 1 ), STACKS_LOWER_BOUND, STACKS_UPPER_BOUND );
345 336
346 //Set model in control. 337 //Set model in control.
347 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 338 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
348 } 339 }
349 340
350 //Sets the 3D model to a cone and modifies the sliders appropriately. 341 //Sets the 3D model to a cone and modifies the sliders appropriately.
@@ -352,20 +343,20 @@ public: @@ -352,20 +343,20 @@ public:
352 { 343 {
353 InitialiseSlidersAndModel(); 344 InitialiseSlidersAndModel();
354 345
355 - //Set up specific renderer properties.  
356 - mRendererMap[ "shape" ] = SHAPE_CONE;  
357 - mRendererMap[ "scaleHeight" ] = DEFAULT_SCALE_HEIGHT;  
358 - mRendererMap[ "scaleBottomRadius" ] = DEFAULT_SCALE_BOTTOM_RADIUS;  
359 - mRendererMap[ "slices" ] = DEFAULT_SLICES; 346 + //Set up specific visual properties.
  347 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONE;
  348 + mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
  349 + mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
  350 + mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
360 351
361 //Set up sliders. 352 //Set up sliders.
362 - SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, "scaleHeight" );  
363 - SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );  
364 - SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, "slices" ); 353 + SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
  354 + SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );
  355 + SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
365 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND ); 356 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
366 357
367 //Set model in control. 358 //Set model in control.
368 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 359 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
369 } 360 }
370 361
371 //Sets the 3D model to a conical frustrum and modifies the sliders appropriately. 362 //Sets the 3D model to a conical frustrum and modifies the sliders appropriately.
@@ -373,20 +364,20 @@ public: @@ -373,20 +364,20 @@ public:
373 { 364 {
374 InitialiseSlidersAndModel(); 365 InitialiseSlidersAndModel();
375 366
376 - //Set up specific renderer properties.  
377 - mRendererMap[ "shape" ] = SHAPE_CONICAL_FRUSTRUM;  
378 - mRendererMap[ "scaleTopRadius" ] = DEFAULT_SCALE_TOP_RADIUS;  
379 - mRendererMap[ "scaleBottomRadius" ] = DEFAULT_SCALE_BOTTOM_RADIUS;  
380 - mRendererMap[ "scaleHeight" ] = DEFAULT_SCALE_HEIGHT;  
381 - mRendererMap[ "slices" ] = DEFAULT_SLICES; 367 + //Set up specific visual properties.
  368 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM;
  369 + mVisualMap[ PrimitiveVisual::Property::SCALE_TOP_RADIUS ] = DEFAULT_SCALE_TOP_RADIUS;
  370 + mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
  371 + mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
  372 + mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
382 373
383 //Set up used sliders. 374 //Set up used sliders.
384 - SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, "scaleHeight" );  
385 - SetupSlider( 1, 0.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );  
386 - SetupSlider( 2, 0.0f, 32.0f, DEFAULT_SCALE_TOP_RADIUS, "scaleTopRadius" ); 375 + SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
  376 + SetupSlider( 1, 0.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );
  377 + SetupSlider( 2, 0.0f, 32.0f, DEFAULT_SCALE_TOP_RADIUS, PrimitiveVisual::Property::SCALE_TOP_RADIUS, "scaleTopRadius" );
387 378
388 //Set model in control. 379 //Set model in control.
389 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 380 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
390 } 381 }
391 382
392 //Sets the 3D model to a cylinder and modifies the sliders appropriately. 383 //Sets the 3D model to a cylinder and modifies the sliders appropriately.
@@ -394,20 +385,20 @@ public: @@ -394,20 +385,20 @@ public:
394 { 385 {
395 InitialiseSlidersAndModel(); 386 InitialiseSlidersAndModel();
396 387
397 - //Set up specific renderer properties.  
398 - mRendererMap[ "shape" ] = SHAPE_CYLINDER;  
399 - mRendererMap[ "scaleHeight" ] = DEFAULT_SCALE_HEIGHT;  
400 - mRendererMap[ "scaleRadius" ] = DEFAULT_SCALE_RADIUS;  
401 - mRendererMap[ "slices" ] = DEFAULT_SLICES; 388 + //Set up specific visual properties.
  389 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CYLINDER;
  390 + mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
  391 + mVisualMap[ PrimitiveVisual::Property::SCALE_RADIUS ] = DEFAULT_SCALE_RADIUS;
  392 + mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
402 393
403 //Set up used sliders. 394 //Set up used sliders.
404 - SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, "scaleHeight" );  
405 - SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_RADIUS, "scaleRadius" );  
406 - SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, "slices" ); 395 + SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
  396 + SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_RADIUS, PrimitiveVisual::Property::SCALE_RADIUS, "scaleRadius" );
  397 + SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
407 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND ); 398 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
408 399
409 //Set model in control. 400 //Set model in control.
410 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 401 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
411 } 402 }
412 403
413 //Sets the 3D model to a cube and modifies the sliders appropriately. 404 //Sets the 3D model to a cube and modifies the sliders appropriately.
@@ -415,11 +406,11 @@ public: @@ -415,11 +406,11 @@ public:
415 { 406 {
416 InitialiseSlidersAndModel(); 407 InitialiseSlidersAndModel();
417 408
418 - //Set up specific renderer properties.  
419 - mRendererMap[ "shape" ] = SHAPE_CUBE; 409 + //Set up specific visual properties.
  410 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CUBE;
420 411
421 //Set model in control. 412 //Set model in control.
422 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 413 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
423 } 414 }
424 415
425 //Sets the 3D model to a bevelled cube and modifies the sliders appropriately. 416 //Sets the 3D model to a bevelled cube and modifies the sliders appropriately.
@@ -427,17 +418,17 @@ public: @@ -427,17 +418,17 @@ public:
427 { 418 {
428 InitialiseSlidersAndModel(); 419 InitialiseSlidersAndModel();
429 420
430 - //Set up specific renderer properties.  
431 - mRendererMap[ "shape" ] = SHAPE_BEVELLED_CUBE;  
432 - mRendererMap[ "bevelPercentage" ] = DEFAULT_BEVEL_PERCENTAGE;  
433 - mRendererMap[ "bevelSmoothness" ] = DEFAULT_BEVEL_SMOOTHNESS; 421 + //Set up specific visual properties.
  422 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::BEVELLED_CUBE;
  423 + mVisualMap[ PrimitiveVisual::Property::BEVEL_PERCENTAGE ] = DEFAULT_BEVEL_PERCENTAGE;
  424 + mVisualMap[ PrimitiveVisual::Property::BEVEL_SMOOTHNESS ] = DEFAULT_BEVEL_SMOOTHNESS;
434 425
435 //Set up used sliders. 426 //Set up used sliders.
436 - SetupSlider( 0, 0.0f, 1.0f, DEFAULT_BEVEL_PERCENTAGE, "bevelPercentage" );  
437 - SetupSlider( 1, 0.0f, 1.0f, DEFAULT_BEVEL_SMOOTHNESS, "bevelSmoothness" ); 427 + SetupSlider( 0, 0.0f, 1.0f, DEFAULT_BEVEL_PERCENTAGE, PrimitiveVisual::Property::BEVEL_PERCENTAGE, "bevelPercentage" );
  428 + SetupSlider( 1, 0.0f, 1.0f, DEFAULT_BEVEL_SMOOTHNESS, PrimitiveVisual::Property::BEVEL_SMOOTHNESS, "bevelSmoothness" );
438 429
439 //Set model in control. 430 //Set model in control.
440 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 431 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
441 } 432 }
442 433
443 //Sets the 3D model to an octahedron and modifies the sliders appropriately. 434 //Sets the 3D model to an octahedron and modifies the sliders appropriately.
@@ -445,20 +436,20 @@ public: @@ -445,20 +436,20 @@ public:
445 { 436 {
446 InitialiseSlidersAndModel(); 437 InitialiseSlidersAndModel();
447 438
448 - //Set up specific renderer properties.  
449 - mRendererMap[ "shape" ] = SHAPE_OCTAHEDRON; 439 + //Set up specific visual properties.
  440 + mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::OCTAHEDRON;
450 441
451 //Set model in control. 442 //Set model in control.
452 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 443 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
453 } 444 }
454 445
455 //Sets up the slider at the given index for the supplied property, and labels it appropriately. 446 //Sets up the slider at the given index for the supplied property, and labels it appropriately.
456 - // rendererPropertyLabel is the property that will be set by this slider. 447 + // visualProperty is the property that will be set by this slider.
457 void SetupSlider( int sliderIndex, float lowerBound, float upperBound, float startPoint, 448 void SetupSlider( int sliderIndex, float lowerBound, float upperBound, float startPoint,
458 - std::string rendererPropertyLabel ) 449 + Property::Index visualProperty, std::string visualPropertyLabel )
459 { 450 {
460 //Set up the slider itself. 451 //Set up the slider itself.
461 - mSliders.at( sliderIndex ).RegisterProperty( "rendererProperty", Property::Value( rendererPropertyLabel ), Property::READ_WRITE ); 452 + mSliders.at( sliderIndex ).RegisterProperty( "visualProperty", Property::Value( visualProperty ), Property::READ_WRITE );
462 mSliders.at( sliderIndex ).SetProperty( Slider::Property::LOWER_BOUND, Property::Value( lowerBound ) ); 453 mSliders.at( sliderIndex ).SetProperty( Slider::Property::LOWER_BOUND, Property::Value( lowerBound ) );
463 mSliders.at( sliderIndex ).SetProperty( Slider::Property::UPPER_BOUND, Property::Value( upperBound ) ); 454 mSliders.at( sliderIndex ).SetProperty( Slider::Property::UPPER_BOUND, Property::Value( upperBound ) );
464 mSliders.at( sliderIndex ).SetProperty( Slider::Property::VALUE, Property::Value( startPoint ) ); 455 mSliders.at( sliderIndex ).SetProperty( Slider::Property::VALUE, Property::Value( startPoint ) );
@@ -468,7 +459,7 @@ public: @@ -468,7 +459,7 @@ public:
468 //We reset the TextLabel to force a relayout of the table. 459 //We reset the TextLabel to force a relayout of the table.
469 mSliderTable.RemoveChildAt( TableView::CellPosition(sliderIndex, 0) ); 460 mSliderTable.RemoveChildAt( TableView::CellPosition(sliderIndex, 0) );
470 461
471 - TextLabel sliderLabel = TextLabel::New( rendererPropertyLabel ); 462 + TextLabel sliderLabel = TextLabel::New( visualPropertyLabel );
472 sliderLabel.SetParentOrigin( ParentOrigin::CENTER ); 463 sliderLabel.SetParentOrigin( ParentOrigin::CENTER );
473 sliderLabel.SetAnchorPoint( AnchorPoint::CENTER ); 464 sliderLabel.SetAnchorPoint( AnchorPoint::CENTER );
474 sliderLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); 465 sliderLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
@@ -547,13 +538,13 @@ public: @@ -547,13 +538,13 @@ public:
547 //When the slider is adjusted, change the corresponding shape property accordingly. 538 //When the slider is adjusted, change the corresponding shape property accordingly.
548 bool OnSliderValueChanged( Slider slider, float value ) 539 bool OnSliderValueChanged( Slider slider, float value )
549 { 540 {
550 - //Update property map to reflect the change to the specific renderer property.  
551 - std::string rendererPropertyLabel;  
552 - slider.GetProperty( slider.GetPropertyIndex( "rendererProperty" ) ).Get( rendererPropertyLabel );  
553 - mRendererMap[ rendererPropertyLabel ] = value; 541 + //Update property map to reflect the change to the specific visual property.
  542 + int visualProperty;
  543 + slider.GetProperty( slider.GetPropertyIndex( "visualProperty" ) ).Get( visualProperty );
  544 + mVisualMap[ visualProperty ] = value;
554 545
555 //Reload the model to display the change. 546 //Reload the model to display the change.
556 - mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mRendererMap ) ); 547 + mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
557 548
558 return true; 549 return true;
559 } 550 }
@@ -622,8 +613,8 @@ private: @@ -622,8 +613,8 @@ private:
622 std::vector<TextLabel> mSliderLabels; ///< Holds the labels to each slider. 613 std::vector<TextLabel> mSliderLabels; ///< Holds the labels to each slider.
623 TableView mSliderTable; ///< A table to layout the sliders next to their labels. 614 TableView mSliderTable; ///< A table to layout the sliders next to their labels.
624 615
625 - Property::Map mRendererMap; ///< Property map to create a primitive renderer.  
626 - Control mModel; ///< Control to house the primitive renderer. 616 + Property::Map mVisualMap; ///< Property map to create a primitive visual.
  617 + Control mModel; ///< Control to house the primitive visual.
627 618
628 PanGestureDetector mPanGestureDetector; ///< Detects pan gestures for rotation of the model. 619 PanGestureDetector mPanGestureDetector; ///< Detects pan gestures for rotation of the model.
629 Animation mRotationAnimation; ///< Automatically rotates the model, unless it is being panned. 620 Animation mRotationAnimation; ///< Automatically rotates the model, unless it is being panned.
examples/scroll-view/scroll-view-example.cpp
@@ -454,12 +454,12 @@ private: @@ -454,12 +454,12 @@ private:
454 { 454 {
455 ImageView actor = ImageView::New(); 455 ImageView actor = ImageView::New();
456 Property::Map map; 456 Property::Map map;
457 - map["rendererType"] = "IMAGE";  
458 - map["url"] = filename;  
459 - map["desiredWidth"] = width;  
460 - map["desiredHeight"] = height;  
461 - map["fittingMode"] = "SCALE_TO_FILL";  
462 - map["samplingMode"] = "BOX_THEN_LINEAR"; 457 + map[Visual::Property::TYPE] = Visual::IMAGE;
  458 + map[ImageVisual::Property::URL] = filename;
  459 + map[ImageVisual::Property::DESIRED_WIDTH] = width;
  460 + map[ImageVisual::Property::DESIRED_HEIGHT] = height;
  461 + map[ImageVisual::Property::FITTING_MODE] = FittingMode::SCALE_TO_FILL;
  462 + map[ImageVisual::Property::SAMPLING_MODE] = SamplingMode::BOX_THEN_LINEAR;
463 actor.SetProperty( ImageView::Property::IMAGE, map ); 463 actor.SetProperty( ImageView::Property::IMAGE, map );
464 464
465 actor.SetName( filename ); 465 actor.SetName( filename );
examples/text-scrolling/text-scrolling-example.cpp
@@ -77,9 +77,9 @@ public: @@ -77,9 +77,9 @@ public:
77 parent.Add( box ); 77 parent.Add( box );
78 78
79 Dali::Property::Map border; 79 Dali::Property::Map border;
80 - border.Insert( "rendererType", "BORDER" );  
81 - border.Insert( "borderColor", Color::WHITE );  
82 - border.Insert( "borderSize", 1.f ); 80 + border.Insert( Visual::Property::TYPE, Visual::BORDER );
  81 + border.Insert( BorderVisual::Property::COLOR, Color::WHITE );
  82 + border.Insert( BorderVisual::Property::SIZE, 1.f );
83 box.SetProperty( Control::Property::BACKGROUND, border ); 83 box.SetProperty( Control::Property::BACKGROUND, border );
84 } 84 }
85 85
examples/video-view/video-view-example.cpp
@@ -210,14 +210,14 @@ class VideoViewController: public ConnectionTracker @@ -210,14 +210,14 @@ class VideoViewController: public ConnectionTracker
210 Stage::GetCurrent().KeyEventSignal().Connect( this, &VideoViewController::OnKeyEvent ); 210 Stage::GetCurrent().KeyEventSignal().Connect( this, &VideoViewController::OnKeyEvent );
211 211
212 Property::Map customShader; 212 Property::Map customShader;
213 - customShader.Insert( "fragmentShader", FRAGMENT_SHADER );  
214 - mCustomShader.Insert( "rendererType", "IMAGE" );  
215 - mCustomShader.Insert( "shader", customShader ); 213 + customShader.Insert( Visual::Shader::Property::FRAGMENT_SHADER, FRAGMENT_SHADER );
  214 + mCustomShader.Insert( Visual::Property::TYPE, Visual::IMAGE );
  215 + mCustomShader.Insert( Visual::Property::SHADER, customShader );
216 216
217 Property::Map defaultShader; 217 Property::Map defaultShader;
218 - customShader.Insert( "fragmentShader", DEFAULT_FRAGMENT_SHADER );  
219 - mDefaultShader.Insert( "rendererType", "IMAGE" );  
220 - mDefaultShader.Insert( "shader", defaultShader ); 218 + customShader.Insert( Visual::Shader::Property::FRAGMENT_SHADER, DEFAULT_FRAGMENT_SHADER );
  219 + mDefaultShader.Insert( Visual::Property::TYPE, Visual::IMAGE );
  220 + mDefaultShader.Insert( Visual::Property::SHADER, customShader );
221 221
222 mWindowSurfaceTarget.Insert( "RENDERING_TARGET", "windowSurfaceTarget" ); 222 mWindowSurfaceTarget.Insert( "RENDERING_TARGET", "windowSurfaceTarget" );
223 mNativeImageTarget.Insert( "RENDERING_TARGET", "nativeImageTarget" ); 223 mNativeImageTarget.Insert( "RENDERING_TARGET", "nativeImageTarget" );
resources/scripts/animated-colors.json
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 "heightResizePolicy":"FILL_TO_PARENT", 42 "heightResizePolicy":"FILL_TO_PARENT",
43 "sizeAspectRatio": false, 43 "sizeAspectRatio": false,
44 "background": { 44 "background": {
45 - "rendererType": "COLOR", 45 + "visualType": "COLOR",
46 "mixColor": [1,1,1,1] 46 "mixColor": [1,1,1,1]
47 }, 47 },
48 "color": [ 48 "color": [
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 "heightResizePolicy":"FILL_TO_PARENT", 78 "heightResizePolicy":"FILL_TO_PARENT",
79 "sizeAspectRatio": false, 79 "sizeAspectRatio": false,
80 "background": { 80 "background": {
81 - "rendererType": "COLOR", 81 + "visualType": "COLOR",
82 "mixColor": [1,1,1,1] 82 "mixColor": [1,1,1,1]
83 }, 83 },
84 "color": [ 84 "color": [
@@ -114,7 +114,7 @@ @@ -114,7 +114,7 @@
114 "heightResizePolicy":"FILL_TO_PARENT", 114 "heightResizePolicy":"FILL_TO_PARENT",
115 "sizeAspectRatio": false, 115 "sizeAspectRatio": false,
116 "background": { 116 "background": {
117 - "rendererType": "COLOR", 117 + "visualType": "COLOR",
118 "mixColor": [1,1,1,1] 118 "mixColor": [1,1,1,1]
119 }, 119 },
120 "color": [ 120 "color": [
@@ -146,7 +146,7 @@ @@ -146,7 +146,7 @@
146 "heightResizePolicy":"FILL_TO_PARENT", 146 "heightResizePolicy":"FILL_TO_PARENT",
147 "sizeAspectRatio": false, 147 "sizeAspectRatio": false,
148 "background": { 148 "background": {
149 - "rendererType": "COLOR", 149 + "visualType": "COLOR",
150 "mixColor": [1,1,1,1] 150 "mixColor": [1,1,1,1]
151 }, 151 },
152 "color": [ 152 "color": [
@@ -182,7 +182,7 @@ @@ -182,7 +182,7 @@
182 "heightResizePolicy":"FILL_TO_PARENT", 182 "heightResizePolicy":"FILL_TO_PARENT",
183 "sizeAspectRatio": false, 183 "sizeAspectRatio": false,
184 "background": { 184 "background": {
185 - "rendererType": "COLOR", 185 + "visualType": "COLOR",
186 "mixColor": [1,1,1,1] 186 "mixColor": [1,1,1,1]
187 }, 187 },
188 "color": [ 188 "color": [
@@ -218,7 +218,7 @@ @@ -218,7 +218,7 @@
218 "heightResizePolicy":"FILL_TO_PARENT", 218 "heightResizePolicy":"FILL_TO_PARENT",
219 "sizeAspectRatio": false, 219 "sizeAspectRatio": false,
220 "background": { 220 "background": {
221 - "rendererType": "COLOR", 221 + "visualType": "COLOR",
222 "mixColor": [1,1,1,1] 222 "mixColor": [1,1,1,1]
223 }, 223 },
224 "color": [ 224 "color": [
@@ -250,7 +250,7 @@ @@ -250,7 +250,7 @@
250 "heightResizePolicy":"FILL_TO_PARENT", 250 "heightResizePolicy":"FILL_TO_PARENT",
251 "sizeAspectRatio": false, 251 "sizeAspectRatio": false,
252 "background": { 252 "background": {
253 - "rendererType": "COLOR", 253 + "visualType": "COLOR",
254 "mixColor": [1,1,1,1] 254 "mixColor": [1,1,1,1]
255 }, 255 },
256 "color": [ 256 "color": [
@@ -286,7 +286,7 @@ @@ -286,7 +286,7 @@
286 "heightResizePolicy":"FILL_TO_PARENT", 286 "heightResizePolicy":"FILL_TO_PARENT",
287 "sizeAspectRatio": false, 287 "sizeAspectRatio": false,
288 "background": { 288 "background": {
289 - "rendererType": "COLOR", 289 + "visualType": "COLOR",
290 "mixColor": [1,1,1,1] 290 "mixColor": [1,1,1,1]
291 }, 291 },
292 "color": [ 292 "color": [
@@ -322,7 +322,7 @@ @@ -322,7 +322,7 @@
322 "heightResizePolicy":"FILL_TO_PARENT", 322 "heightResizePolicy":"FILL_TO_PARENT",
323 "sizeAspectRatio": false, 323 "sizeAspectRatio": false,
324 "background": { 324 "background": {
325 - "rendererType": "COLOR", 325 + "visualType": "COLOR",
326 "mixColor": [1,1,1,1] 326 "mixColor": [1,1,1,1]
327 }, 327 },
328 "color": [ 328 "color": [
@@ -354,7 +354,7 @@ @@ -354,7 +354,7 @@
354 "heightResizePolicy":"FILL_TO_PARENT", 354 "heightResizePolicy":"FILL_TO_PARENT",
355 "sizeAspectRatio": false, 355 "sizeAspectRatio": false,
356 "background": { 356 "background": {
357 - "rendererType": "COLOR", 357 + "visualType": "COLOR",
358 "mixColor": [1,1,1,1] 358 "mixColor": [1,1,1,1]
359 }, 359 },
360 "color": [ 360 "color": [
@@ -386,7 +386,7 @@ @@ -386,7 +386,7 @@
386 "heightResizePolicy":"FILL_TO_PARENT", 386 "heightResizePolicy":"FILL_TO_PARENT",
387 "sizeAspectRatio": false, 387 "sizeAspectRatio": false,
388 "background": { 388 "background": {
389 - "rendererType": "COLOR", 389 + "visualType": "COLOR",
390 "mixColor": [1,1,1,1] 390 "mixColor": [1,1,1,1]
391 }, 391 },
392 "color": [ 392 "color": [
@@ -418,7 +418,7 @@ @@ -418,7 +418,7 @@
418 "heightResizePolicy":"FILL_TO_PARENT", 418 "heightResizePolicy":"FILL_TO_PARENT",
419 "sizeAspectRatio": false, 419 "sizeAspectRatio": false,
420 "background": { 420 "background": {
421 - "rendererType": "COLOR", 421 + "visualType": "COLOR",
422 "mixColor": [1,1,1,1] 422 "mixColor": [1,1,1,1]
423 }, 423 },
424 "color": [ 424 "color": [
@@ -450,7 +450,7 @@ @@ -450,7 +450,7 @@
450 "heightResizePolicy":"FILL_TO_PARENT", 450 "heightResizePolicy":"FILL_TO_PARENT",
451 "sizeAspectRatio": false, 451 "sizeAspectRatio": false,
452 "background": { 452 "background": {
453 - "rendererType": "COLOR", 453 + "visualType": "COLOR",
454 "mixColor": [1,1,1,1] 454 "mixColor": [1,1,1,1]
455 }, 455 },
456 "color": [ 456 "color": [
@@ -486,7 +486,7 @@ @@ -486,7 +486,7 @@
486 "heightResizePolicy":"FILL_TO_PARENT", 486 "heightResizePolicy":"FILL_TO_PARENT",
487 "sizeAspectRatio": false, 487 "sizeAspectRatio": false,
488 "background": { 488 "background": {
489 - "rendererType": "COLOR", 489 + "visualType": "COLOR",
490 "mixColor": [1,1,1,1] 490 "mixColor": [1,1,1,1]
491 }, 491 },
492 "color": [ 492 "color": [
@@ -518,7 +518,7 @@ @@ -518,7 +518,7 @@
518 "heightResizePolicy":"FILL_TO_PARENT", 518 "heightResizePolicy":"FILL_TO_PARENT",
519 "sizeAspectRatio": false, 519 "sizeAspectRatio": false,
520 "background": { 520 "background": {
521 - "rendererType": "COLOR", 521 + "visualType": "COLOR",
522 "mixColor": [1,1,1,1] 522 "mixColor": [1,1,1,1]
523 }, 523 },
524 "color": [ 524 "color": [
@@ -557,7 +557,7 @@ @@ -557,7 +557,7 @@
557 "heightResizePolicy":"FILL_TO_PARENT", 557 "heightResizePolicy":"FILL_TO_PARENT",
558 "sizeAspectRatio": false, 558 "sizeAspectRatio": false,
559 "background": { 559 "background": {
560 - "rendererType": "COLOR", 560 + "visualType": "COLOR",
561 "mixColor": [1,1,1,1] 561 "mixColor": [1,1,1,1]
562 }, 562 },
563 "color": [ 563 "color": [
@@ -589,7 +589,7 @@ @@ -589,7 +589,7 @@
589 "heightResizePolicy":"FILL_TO_PARENT", 589 "heightResizePolicy":"FILL_TO_PARENT",
590 "sizeAspectRatio": false, 590 "sizeAspectRatio": false,
591 "background": { 591 "background": {
592 - "rendererType": "COLOR", 592 + "visualType": "COLOR",
593 "mixColor": [1,1,1,1] 593 "mixColor": [1,1,1,1]
594 }, 594 },
595 "color": [ 595 "color": [
@@ -622,7 +622,7 @@ @@ -622,7 +622,7 @@
622 "heightResizePolicy":"FILL_TO_PARENT", 622 "heightResizePolicy":"FILL_TO_PARENT",
623 "sizeAspectRatio": false, 623 "sizeAspectRatio": false,
624 "background": { 624 "background": {
625 - "rendererType": "COLOR", 625 + "visualType": "COLOR",
626 "mixColor": [1,1,1,1] 626 "mixColor": [1,1,1,1]
627 }, 627 },
628 "color": [ 628 "color": [
@@ -661,7 +661,7 @@ @@ -661,7 +661,7 @@
661 "heightResizePolicy":"FILL_TO_PARENT", 661 "heightResizePolicy":"FILL_TO_PARENT",
662 "sizeAspectRatio": false, 662 "sizeAspectRatio": false,
663 "background": { 663 "background": {
664 - "rendererType": "COLOR", 664 + "visualType": "COLOR",
665 "mixColor": [1,1,1,1] 665 "mixColor": [1,1,1,1]
666 }, 666 },
667 "color": [ 667 "color": [
@@ -693,7 +693,7 @@ @@ -693,7 +693,7 @@
693 "heightResizePolicy":"FILL_TO_PARENT", 693 "heightResizePolicy":"FILL_TO_PARENT",
694 "sizeAspectRatio": false, 694 "sizeAspectRatio": false,
695 "background": { 695 "background": {
696 - "rendererType": "COLOR", 696 + "visualType": "COLOR",
697 "mixColor": [1,1,1,1] 697 "mixColor": [1,1,1,1]
698 }, 698 },
699 "color": [ 699 "color": [
@@ -726,7 +726,7 @@ @@ -726,7 +726,7 @@
726 "heightResizePolicy":"FILL_TO_PARENT", 726 "heightResizePolicy":"FILL_TO_PARENT",
727 "sizeAspectRatio": false, 727 "sizeAspectRatio": false,
728 "background": { 728 "background": {
729 - "rendererType": "COLOR", 729 + "visualType": "COLOR",
730 "mixColor": [1,1,1,1] 730 "mixColor": [1,1,1,1]
731 }, 731 },
732 "color": [ 732 "color": [
@@ -758,7 +758,7 @@ @@ -758,7 +758,7 @@
758 "heightResizePolicy":"FILL_TO_PARENT", 758 "heightResizePolicy":"FILL_TO_PARENT",
759 "sizeAspectRatio": false, 759 "sizeAspectRatio": false,
760 "background": { 760 "background": {
761 - "rendererType": "COLOR", 761 + "visualType": "COLOR",
762 "mixColor": [1,1,1,1] 762 "mixColor": [1,1,1,1]
763 }, 763 },
764 "color": [ 764 "color": [
@@ -790,7 +790,7 @@ @@ -790,7 +790,7 @@
790 "heightResizePolicy":"FILL_TO_PARENT", 790 "heightResizePolicy":"FILL_TO_PARENT",
791 "sizeAspectRatio": false, 791 "sizeAspectRatio": false,
792 "background": { 792 "background": {
793 - "rendererType": "COLOR", 793 + "visualType": "COLOR",
794 "mixColor": [1,1,1,1] 794 "mixColor": [1,1,1,1]
795 }, 795 },
796 "color": [ 796 "color": [
@@ -823,7 +823,7 @@ @@ -823,7 +823,7 @@
823 "sizeModeFactor": [0.25,0.166667,1], 823 "sizeModeFactor": [0.25,0.166667,1],
824 "sizeAspectRatio": false, 824 "sizeAspectRatio": false,
825 "background": { 825 "background": {
826 - "rendererType": "COLOR", 826 + "visualType": "COLOR",
827 "mixColor": [1,1,1,1] 827 "mixColor": [1,1,1,1]
828 }, 828 },
829 "color": [ 829 "color": [
resources/scripts/background.json
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 30 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
31 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 31 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
32 "background":{ 32 "background":{
33 - "rendererType": "COLOR", 33 + "visualType": "COLOR",
34 "mixColor": [ 0.8, 0, 0.2, 1 ] 34 "mixColor": [ 0.8, 0, 0.2, 1 ]
35 } 35 }
36 }, 36 },
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 45 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
46 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 46 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
47 "background": { 47 "background": {
48 - "rendererType": "IMAGE", 48 + "visualType": "IMAGE",
49 "url": "{DEMO_IMAGE_DIR}Kid1.svg" 49 "url": "{DEMO_IMAGE_DIR}Kid1.svg"
50 } 50 }
51 }, 51 },
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 60 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
61 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 61 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
62 "background": { 62 "background": {
63 - "rendererType" : "BORDER", 63 + "visualType" : "BORDER",
64 "borderColor" : [ 0.5, 0.5, 0.5, 1 ], 64 "borderColor" : [ 0.5, 0.5, 0.5, 1 ],
65 "borderSize" : 15.0 65 "borderSize" : 15.0
66 } 66 }
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 76 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
77 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 77 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
78 "background": { 78 "background": {
79 - "rendererType": "IMAGE", 79 + "visualType": "IMAGE",
80 "url": "{DEMO_IMAGE_DIR}gallery-large-9.jpg" 80 "url": "{DEMO_IMAGE_DIR}gallery-large-9.jpg"
81 } 81 }
82 }, 82 },
@@ -91,7 +91,7 @@ @@ -91,7 +91,7 @@
91 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 91 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
92 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 92 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
93 "background":{ 93 "background":{
94 - "rendererType": "COLOR", 94 + "visualType": "COLOR",
95 "mixColor": [ 1, 1, 0, 1 ] 95 "mixColor": [ 1, 1, 0, 1 ]
96 } 96 }
97 }, 97 },
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", 106 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
107 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], 107 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
108 "background": { 108 "background": {
109 - "rendererType" : "GRADIENT", 109 + "visualType" : "GRADIENT",
110 "startPosition" : [ -0.5, -0.5 ], 110 "startPosition" : [ -0.5, -0.5 ],
111 "endPosition": [ 0.5, 0.5 ], 111 "endPosition": [ 0.5, 0.5 ],
112 "stopColor" : [ 112 "stopColor" : [
resources/scripts/clock.json
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 "parentOrigin": [0.5, 0.5, 0.5], 8 "parentOrigin": [0.5, 0.5, 0.5],
9 "anchorPoint": [0.5, 1, 0.5], 9 "anchorPoint": [0.5, 1, 0.5],
10 "background": { 10 "background": {
11 - "rendererType": "COLOR", 11 + "visualType": "COLOR",
12 "mixColor": [0.71, 0, 0, 1] 12 "mixColor": [0.71, 0, 0, 1]
13 }, 13 },
14 "selected": false, 14 "selected": false,
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 "parentOrigin": [0.5, 0.5, 0.5], 27 "parentOrigin": [0.5, 0.5, 0.5],
28 "anchorPoint": [0.5, 1, 0.5], 28 "anchorPoint": [0.5, 1, 0.5],
29 "background": { 29 "background": {
30 - "rendererType": "COLOR", 30 + "visualType": "COLOR",
31 "mixColor": [0, 0.14200000000000013, 0.71, 0.7] 31 "mixColor": [0, 0.14200000000000013, 0.71, 0.7]
32 }, 32 },
33 "signals": [ 33 "signals": [
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 "parentOrigin": [0.5, 0.5, 0.5], 45 "parentOrigin": [0.5, 0.5, 0.5],
46 "anchorPoint": [0.5, 1, 0.5], 46 "anchorPoint": [0.5, 1, 0.5],
47 "background": { 47 "background": {
48 - "rendererType": "COLOR", 48 + "visualType": "COLOR",
49 "mixColor": [0.057450000000000064, 0.3, 0.0030000000000000027, 0.7] 49 "mixColor": [0.057450000000000064, 0.3, 0.0030000000000000027, 0.7]
50 }, 50 },
51 "signals": [ 51 "signals": [
resources/scripts/table-view.json
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 "name":"simpleTable", 43 "name":"simpleTable",
44 "type":"TableView", 44 "type":"TableView",
45 "background":{ 45 "background":{
46 - "rendererType": "COLOR", 46 + "visualType": "COLOR",
47 "mixColor": [0.5,0.5,0,1] 47 "mixColor": [0.5,0.5,0,1]
48 }, 48 },
49 "parentOrigin": "CENTER", 49 "parentOrigin": "CENTER",
resources/style/demo-theme.json.in
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 { 69 {
70 "background": 70 "background":
71 { 71 {
72 - "rendererType": "GRADIENT", 72 + "visualType": "GRADIENT",
73 "center": [240, 400], 73 "center": [240, 400],
74 "radius": 932, 74 "radius": 932,
75 "units": "USER_SPACE", 75 "units": "USER_SPACE",
resources/style/mobile/demo-theme.json.in
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 { 82 {
83 "background": 83 "background":
84 { 84 {
85 - "rendererType": "GRADIENT", 85 + "visualType": "GRADIENT",
86 "center": [360, 640], 86 "center": [360, 640],
87 "radius": 1468, 87 "radius": 1468,
88 "units": "USER_SPACE", 88 "units": "USER_SPACE",
shared/dali-demo-strings.h
@@ -109,7 +109,7 @@ extern &quot;C&quot; @@ -109,7 +109,7 @@ extern &quot;C&quot;
109 #define DALI_DEMO_STR_TITLE_SUPER_BLUR_BLOOM "Super Blur and Bloom" 109 #define DALI_DEMO_STR_TITLE_SUPER_BLUR_BLOOM "Super Blur and Bloom"
110 #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW "Effects View" 110 #define DALI_DEMO_STR_TITLE_EFFECTS_VIEW "Effects View"
111 #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE "Native Image Source" 111 #define DALI_DEMO_STR_TITLE_NATIVE_IMAGE_SOURCE "Native Image Source"
112 -#define DALI_DEMO_STR_TITLE_MESH_RENDERER "Mesh Renderer" 112 +#define DALI_DEMO_STR_TITLE_MESH_VISUAL "Mesh Visual"
113 #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes" 113 #define DALI_DEMO_STR_TITLE_PRIMITIVE_SHAPES "Primitive Shapes"
114 114
115 #endif 115 #endif
shared/view.h
@@ -131,13 +131,13 @@ Dali::Layer CreateView( Dali::Application&amp; application, @@ -131,13 +131,13 @@ Dali::Layer CreateView( Dali::Application&amp; application,
131 if ( !backgroundImagePath.empty() ) 131 if ( !backgroundImagePath.empty() )
132 { 132 {
133 Dali::Property::Map map; 133 Dali::Property::Map map;
134 - map["rendererType"] = "IMAGE";  
135 - map["url"] = backgroundImagePath;  
136 - map["desiredWidth"] = stage.GetSize().x;  
137 - map["desiredHeight"] = stage.GetSize().y;  
138 - map["fittingMode"] = "SCALE_TO_FILL";  
139 - map["samplingMode"] = "BOX_THEN_LINEAR";  
140 - map["synchronousLoading"] = true; 134 + map[Dali::Toolkit::Visual::Property::TYPE] = Dali::Toolkit::Visual::IMAGE;
  135 + map[Dali::Toolkit::ImageVisual::Property::URL] = backgroundImagePath;
  136 + map[Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH] = stage.GetSize().x;
  137 + map[Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = stage.GetSize().y;
  138 + map[Dali::Toolkit::ImageVisual::Property::FITTING_MODE] = Dali::FittingMode::SCALE_TO_FILL;
  139 + map[Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE] = Dali::SamplingMode::BOX_THEN_LINEAR;
  140 + map[Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
141 view.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map ); 141 view.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
142 } 142 }
143 143