Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
- DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "color" );
+ DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "COLOR" );
DALI_TEST_CHECK( resultMap->Find( "mixColor" ) );
DALI_TEST_CHECK( resultMap->Find( "mixColor" )->Get<Vector4>() == Color::RED );
Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
- DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "IMAGE" );
DALI_TEST_CHECK( resultMap->Find( "url" ) );
DALI_TEST_CHECK( resultMap->Find( "url" )->Get<std::string>() == "TestImage" );
DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() );
Property::Map imageMap;
- imageMap[ "rendererType" ] = "image";
+ imageMap[ "rendererType" ] = "IMAGE";
imageMap[ "url" ] = "TestImage";
control.SetProperty( Control::Property::BACKGROUND, imageMap );
Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND );
Property::Map* resultMap = propValue.GetMap();
DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
- DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "IMAGE" );
DALI_TEST_CHECK( resultMap->Find( "url" ) );
DALI_TEST_CHECK( resultMap->Find( "url" )->Get<std::string>() == "TestImage" );
Property::Map rendererMap;
- rendererMap["rendererType"] = "color";
+ rendererMap["rendererType"] = "COLOR";
rendererMap["mixColor"] = Color::CYAN;
control.SetProperty( Control::Property::BACKGROUND, rendererMap );
propValue = control.GetProperty( Control::Property::BACKGROUND );
resultMap = propValue.GetMap();
DALI_TEST_CHECK( resultMap->Find( "rendererType" ) );
- DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "color" );
+ DALI_TEST_CHECK( resultMap->Find( "rendererType" )->Get<std::string>() == "COLOR" );
DALI_TEST_CHECK( resultMap->Find( "mixColor" ) );
DALI_TEST_CHECK( resultMap->Find( "mixColor" )->Get<Vector4>() == Color::CYAN );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "color");
+ propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", Color::BLUE);
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "color");
+ propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", Color::BLUE);
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
// color renderer
Dali::Property::Map map;
- map[ "rendererType" ] = "color";
+ map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = Color::MAGENTA;
ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
colorRenderer.SetSize( rendererSize );
// border renderer
float borderSize = 5.f;
map.Clear();
- map[ "rendererType" ] = "border";
+ map[ "rendererType" ] = "BORDER";
map[ "borderColor" ] = Color::RED;
map[ "borderSize" ] = borderSize;
ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
// gradient renderer
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 start(-1.f, -1.f);
Vector2 end(1.f, 1.f);
propertyMap.Insert("startPosition", start);
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "color");
+ propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", Color::BLUE);
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "color");
+ propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", Color::BLUE);
ControlRenderer colorRenderer = factory.CreateControlRenderer( propertyMap );
Property::Value* typeValue = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_CHECK( typeValue->Get<std::string>() == "color" );
+ DALI_TEST_CHECK( typeValue->Get<std::string>() == "COLOR" );
Property::Value* colorValue = resultMap.Find( "mixColor", Property::VECTOR4 );
DALI_TEST_CHECK( colorValue );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "border");
+ propertyMap.Insert("rendererType", "BORDER");
propertyMap.Insert("borderColor", Color::BLUE);
propertyMap.Insert("borderSize", 5.f);
ControlRenderer borderRenderer = factory.CreateControlRenderer( propertyMap );
// check the property values from the returned map from control renderer
Property::Value* typeValue = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+ DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
Property::Value* colorValue = resultMap.Find( "borderColor", Property::VECTOR4 );
DALI_TEST_CHECK( colorValue );
DALI_TEST_CHECK( sizeValue->Get<float>() == 5.f );
Property::Map propertyMap1;
- propertyMap1[ "rendererType" ] = "border";
+ propertyMap1[ "rendererType" ] = "BORDER";
propertyMap1[ "borderColor" ] = Color::CYAN;
propertyMap1[ "borderSize" ] = 10.0f;
borderRenderer = factory.CreateControlRenderer( propertyMap1 );
typeValue = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( typeValue );
- DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+ DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
colorValue = resultMap.Find( "borderColor", Property::VECTOR4 );
DALI_TEST_CHECK( colorValue );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 start(-1.f, -1.f);
Vector2 end(1.f, 1.f);
// check the property values from the returned map from control renderer
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
value = resultMap.Find( "units", Property::STRING );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 center(100.f, 100.f);
float radius = 100.f;
// check the property values from the returned map from control renderer
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
value = resultMap.Find( "units", Property::STRING );
DALI_TEST_CHECK( value );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_IMAGE_FILE_NAME );
propertyMap.Insert( "desiredWidth", 20 );
propertyMap.Insert( "desiredHeight", 30 );
// check the property values from the returned map from control renderer
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
value = resultMap.Find( "url", Property::STRING );
DALI_TEST_CHECK( value );
value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
value = resultMap.Find( "url", Property::STRING );
DALI_TEST_CHECK( value );
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
propertyMap.Insert( "borderOnly", true );
ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap );
// check the property values from the returned map from control renderer
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
value = resultMap.Find( "url", Property::STRING );
DALI_TEST_CHECK( value );
// request SvgRenderer with a property map
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_SVG_FILE_NAME );
ControlRenderer svgRenderer = factory.CreateControlRenderer( propertyMap );
// check the property values from the returned map from control renderer
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
value = resultMap.Find( "url", Property::STRING );
DALI_TEST_CHECK( value );
// check the property values from the returned map from control renderer
value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
value = resultMap.Find( "url", Property::STRING );
DALI_TEST_CHECK( value );
//Request MeshRenderer using a property map.
RendererFactory factory = RendererFactory::Get();
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_LOCATION );
//Check values in the result map are identical to the initial map's values.
Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
DALI_TEST_CHECK( value );
- DALI_TEST_CHECK( value->Get<std::string>() == "mesh" );
+ DALI_TEST_CHECK( value->Get<std::string>() == "MESH" );
value = resultMap.Find( "objectUrl", Property::STRING );
DALI_TEST_CHECK( value );
Property::Value* typeValue = propertyMap.Find( "rendererType", Property::STRING );
if ( typeValue )
{
- isDebugRendererType = ( typeValue->Get<std::string>() == "debug" );
+ isDebugRendererType = ( typeValue->Get<std::string>() == "DEBUG" );
}
Actor actor = Actor::New();
// Test that color renderer is replaced with debug renderer
Property::Map propertyMap1;
- propertyMap1.Insert("rendererType", "color");
+ propertyMap1.Insert("rendererType", "COLOR");
propertyMap1.Insert("mixColor", Color::BLUE);
ControlRenderer colorRenderer = factory.CreateControlRenderer(propertyMap1);
DALI_TEST_CHECK( colorRenderer );
// Test that border renderer is replaced with debug renderer
Property::Map propertyMap2;
- propertyMap2.Insert("rendererType", "border");
+ propertyMap2.Insert("rendererType", "BORDER");
propertyMap2.Insert("borderColor", Color::BLUE);
propertyMap2.Insert("borderSize", 2.f);
ControlRenderer borderRenderer = factory.CreateControlRenderer(propertyMap2);
// Test that gradient renderer is replaced with debug renderer
Property::Map propertyMap3;
- propertyMap3.Insert("rendererType", "gradient");
+ propertyMap3.Insert("rendererType", "GRADIENT");
Vector2 start(-1.f, -1.f);
Vector2 end(1.f, 1.f);
propertyMap3.Insert("startPosition", start);
// Test that image renderer is replaced with debug renderer
Property::Map propertyMap4;
- propertyMap4.Insert( "rendererType", "image" );
+ propertyMap4.Insert( "rendererType", "IMAGE" );
propertyMap4.Insert( "url", TEST_IMAGE_FILE_NAME );
ControlRenderer imageRenderer = factory.CreateControlRenderer( propertyMap4 );
DALI_TEST_CHECK( imageRenderer );
// Test that n patch renderer is replaced with debug renderer
Property::Map propertyMap5;
- propertyMap5.Insert( "rendererType", "image" );
+ propertyMap5.Insert( "rendererType", "IMAGE" );
propertyMap5.Insert( "url", TEST_NPATCH_FILE_NAME );
ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap4 );
DALI_TEST_CHECK( nPatchRenderer );
// Test that color renderer is replaced with debug renderer
Dali::Property::Map map;
- map[ "rendererType" ] = "color";
+ map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = Color::CYAN;
ControlRenderer colorRenderer = factory.CreateControlRenderer( map);
// Test that border renderer is replaced with debug renderer
map.Clear();
- map[ "rendererType" ] = "border";
+ map[ "rendererType" ] = "BORDER";
map[ "borderColor" ] = Color::GREEN;
map[ "borderSize" ] = 2.f;
ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
Property::Map propertyMap;
Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
- propertyMap.Insert("rendererType", "color");
+ propertyMap.Insert("rendererType", "COLOR");
propertyMap.Insert("mixColor", testColor);
ControlRenderer controlRenderer = factory.CreateControlRenderer(propertyMap);
Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
Dali::Property::Map map;
- map[ "rendererType" ] = "color";
+ map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = testColor;
ControlRenderer controlRenderer = factory.CreateControlRenderer( map );
DALI_TEST_CHECK( controlRenderer );
Property::Map propertyMap;
Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f );
float testSize = 5.f;
- propertyMap.Insert("rendererType", "border");
+ propertyMap.Insert("rendererType", "BORDER");
propertyMap.Insert("borderColor", testColor);
propertyMap.Insert("borderSize", testSize);
float testSize = 5.f;
Dali::Property::Map propertyMap;
- propertyMap[ "rendererType" ] = "border";
+ propertyMap[ "rendererType" ] = "BORDER";
propertyMap[ "borderColor" ] = testColor;
propertyMap[ "borderSize" ] = testSize;
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
// enable the anti-aliasing
Dali::Property::Map map;
- map[ "rendererType" ] = "border";
+ map[ "rendererType" ] = "BORDER";
map[ "borderColor" ] = testColor;
map[ "borderSize" ] = testSize;
map[ "antiAliasing" ] = true;
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 start(-1.f, -1.f);
Vector2 end(1.f, 1.f);
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 center(100.f, 100.f);
float radius = 100.f;
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert("rendererType", "gradient");
+ propertyMap.Insert("rendererType", "GRADIENT");
Vector2 start(-1.f, -1.f);
Vector2 end(1.f, 1.f);
DALI_TEST_CHECK( factory );
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_IMAGE_FILE_NAME );
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
{
tet_infoline( "whole grid" );
Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY );
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "image" );
+ propertyMap.Insert( "rendererType", "IMAGE" );
propertyMap.Insert( "url", TEST_NPATCH_FILE_NAME );
{
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", "" );
propertyMap.Insert( "texturesPath", "" );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", TEST_SIMPLE_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
propertyMap.Insert( "materialUrl", "invalid" );
propertyMap.Insert( "texturesPath", "also invalid" );
//Set up renderer properties.
Property::Map propertyMap;
- propertyMap.Insert( "rendererType", "mesh" );
+ propertyMap.Insert( "rendererType", "MESH" );
propertyMap.Insert( "objectUrl", "invalid" );
propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
{
Property::Map map;
- map["rendererType"] = "image";
+ map["rendererType"] = "IMAGE";
map["size"] = Vector2(200, 200);
map["url"] = "track2.png";
slider.SetProperty(Slider::Property::TRACK_VISUAL, map);
RendererFactory factory = RendererFactory::Get();
Dali::Property::Map map;
- map[ "rendererType" ] = "color";
+ map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = color;
ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
colorRenderer.SetOnStage( solidColorActor );
Toolkit::ControlRenderer colorRenderer;
Property::Map map;
- map["rendererType"] = "color";
+ map["rendererType"] = "COLOR";
map["mixColor"] = color;
colorRenderer = rendererFactory.CreateControlRenderer( map );
Actor self = Self();
Property::Map rendererMap;
- rendererMap.Insert( "rendererType", "image" );
+ rendererMap.Insert( "rendererType", "IMAGE" );
switch( type )
{
#include <dali-toolkit/internal/controls/renderers/renderer-factory-impl.h>
#include <dali-toolkit/internal/controls/renderers/renderer-factory-cache.h>
#include <dali-toolkit/internal/controls/renderers/control-renderer-data-impl.h>
+#include <dali-toolkit/internal/controls/renderers/renderer-string-constants.h>
namespace Dali
{
namespace
{
-const char * const RENDERER_TYPE("rendererType");
-const char * const RENDERER_TYPE_VALUE("debug");
-
const char * const POSITION_ATTRIBUTE_NAME("aPosition");
const char * const INDEX_NAME("indices");
void DebugRenderer::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( RENDERER_TYPE, RENDERER_TYPE_VALUE );
+ map.Insert( RENDERER_TYPE, DEBUG_RENDERER );
}
void DebugRenderer::InitializeRenderer()
GLOSS_INDEX = 2u
};
-const char * const RENDERER_TYPE_VALUE( "mesh" ); //String label for which type of control renderer this is.
const char * const LIGHT_POSITION( "uLightPosition" ); //Shader property
const char * const OBJECT_MATRIX( "uObjectMatrix" ); //Shader property
void MeshRenderer::DoCreatePropertyMap( Property::Map& map ) const
{
map.Clear();
- map.Insert( RENDERER_TYPE, RENDERER_TYPE_VALUE );
+ map.Insert( RENDERER_TYPE, MESH_RENDERER );
map.Insert( OBJECT_URL, mObjectUrl );
map.Insert( MATERIAL_URL, mMaterialUrl );
map.Insert( TEXTURES_PATH, mTexturesPath );
{
const char * const RENDERER_TYPE("rendererType");
-const char * const COLOR_RENDERER("color");
-const char * const BORDER_RENDERER("border");
-const char * const GRADIENT_RENDERER("gradient");
-const char * const IMAGE_RENDERER("image");
-const char * const MESH_RENDERER("mesh");
+const char * const COLOR_RENDERER("COLOR");
+const char * const BORDER_RENDERER("BORDER");
+const char * const GRADIENT_RENDERER("GRADIENT");
+const char * const IMAGE_RENDERER("IMAGE");
+const char * const MESH_RENDERER("MESH");
+const char * const DEBUG_RENDERER("DEBUG");
const char * const IMAGE_URL_NAME("url");
const char * const ATLAS_RECT_UNIFORM_NAME ( "uAtlasRect" );
-const char * const COLOR( "color" );
//Mesh properties
const char * const OBJECT_URL( "objectUrl" );
extern const char * const GRADIENT_RENDERER;
extern const char * const IMAGE_RENDERER;
extern const char * const MESH_RENDERER;
+extern const char * const DEBUG_RENDERER;
extern const char * const IMAGE_URL_NAME;
extern const char * const ATLAS_RECT_UNIFORM_NAME;
-extern const char * const COLOR;
//Mesh properties
extern const char * const OBJECT_URL;
customShader[ "fragmentShader" ] = COMPOSITE_FRAGMENT_SOURCE;
rendererMap[ "shader"] = customShader;
- rendererMap[ "rendererType"] = "image";
+ rendererMap[ "rendererType"] = "IMAGE";
mRootActor.Add( mActorForComposite );
"popupIconColor":[1.0,1.0,1.0,1.0],
"popupPressedColor":[0.24,0.72,0.8,0.11],
"background": {
- "rendererType": "image",
+ "rendererType": "IMAGE",
"url": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
},
"popupFadeInDuration":0.25,
"popupIconColor":[1.0,1.0,1.0,1.0],
"popupPressedColor":[0.24,0.72,0.8,0.11],
"background": {
- "rendererType": "image",
+ "rendererType": "IMAGE",
"url": "{DALI_IMAGE_DIR}selection-popup-bg.9.png"
},
"popupFadeInDuration":0.25,
// Set another property to set the image-map
Property::Map imageMap;
- imageMap[ "rendererType" ] = "image";
+ imageMap[ "rendererType" ] = "IMAGE";
imageMap[ "url" ] = IMAGE_CARDS;
imageMap[ "desiredWidth" ] = 100;
imageMap[ "desiredHeight" ] = 100;
The background can be set to use a specified renderer, e.g the border renderer
@code
Property::Map renderer;
-renderer.Insert("rendererType","border");
+renderer.Insert("rendererType","BORDER");
renderer.Insert("borderColor",COLOR::RED);
renderer.Insert("borderSize",20.f);
*
* @code
* Property::Map renderer;
- * renderer.Insert("rendererType","border");
+ * renderer.Insert("rendererType","BORDER");
* renderer.Insert("borderColor",COLOR::RED);
* renderer.Insert("borderSize",20.f);
*
// Set an image view property
imageView.image = {
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "images/icon-0.png",
"desiredWidth" : 100,
"desiredHeight" : 100
"position": [0, 0, 0],
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url" : "images/icon-0.png",
"desiredWidth" : 100,
"desiredHeight" : 100
### Properties Supported
-**RendererType:** "color"
+**RendererType:** "COLOR"
| Property Name | Type | Required | Description |
|---------------|:-------:|:--------:|---------------------------|
Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
Dali::Property::Map map;
-map[ "rendererType" ] = "color";
+map[ "rendererType" ] = "COLOR";
map[ "mixColor" ] = Color::RED;
control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
control.background =
{
- rendererType : "color",
+ rendererType : "COLOR",
mixColor : dali.COLOR_RED
};
~~~
### Properties Supported
-**RendererType:** "gradient"
+**RendererType:** "GRADIENT"
| Property Name | Type | Required | Description |
|------------------------------------------------------|:----------------:|:----------:|--------------------------------------------------------------------------|
Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
Dali::Property::Map map;
-map[ "rendererType" ] = "gradient";
+map[ "rendererType" ] = "GRADIENT";
map[ "startPosition" ] = Vector2( 0.5f, 0.5f );
map[ "endPosition" ] = Vector2( -0.5f, -0.5f );
control.background =
{
- rendererType : "gradient",
+ rendererType : "GRADIENT",
startPosition : [ 0.5, 0.5 ],
endPosition : [ -0.5, -0.5 ],
stopOffset : [ 0.0, 0.3, 0.6, 0.8, 1.0 ],
Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
Dali::Property::Map map;
-map[ "rendererType" ] = "gradient";
+map[ "rendererType" ] = "GRADIENT";
map[ "center" ] = Vector2( 0.5f, 0.5f );
map[ "radius" ] = 1.414f;
control.background =
{
- rendererType : "gradient",
+ rendererType : "GRADIENT",
center : [ 0.5, 0.5 ],
radius : 1.414,
stopOffset : [ 0.0, 0.3, 0.6, 0.8, 1.0 ],
#### Properties Supported
-**RendererType:** "image"
+**RendererType:** "IMAGE"
| Property Name | Type | Required | Description |
|------------------------------------------------------|:--------:|:--------:|----------------------------------------------------------------------------------------------------------------|
Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
Dali::Property::Map map;
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
map[ "url" ] = "path-to-image.jpg";
control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
control.background =
{
- rendererType : "image",
+ rendererType : "IMAGE",
url : "path-to-image.jpg"
};
~~~
#### Properties Supported
-**RendererType:** "image"
+**RendererType:** "IMAGE"
| Property Name | Type | Required | Description |
|---------------|:-------:|:--------:|----------------------------------|
Dali::Property::Map map;
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
map[ "url" ] = "path-to-image.9.png";
control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
control.background =
{
- rendererType : "image",
+ rendererType : "IMAGE",
url : "path-to-image.9.png"
};
~~~
#### Properties Supported
-**RendererType:** "image"
+**RendererType:** "IMAGE"
| Property Name | Type | Required | Description |
|---------------|:-------:|:--------:|----------------------------------|
Dali::Property::Map map;
-map[ "rendererType" ] = "image";
+map[ "rendererType" ] = "IMAGE";
map[ "url" ] = "path-to-image.svg";
control.SetSize( 200.f, 200.f );
control.background =
{
- rendererType : "image",
+ rendererType : "IMAGE",
url : "path-to-image.svg"
};
~~~
### Properties Supported
-**RendererType:** "border"
+**RendererType:** "BORDER"
| Property Name | Type | Required | Description |
|---------------|:-------:|:--------:|--------------------------------------------------|
Dali::Property::Map map;
-map[ "rendererType" ] = "border";
+map[ "rendererType" ] = "BORDER";
map[ "borderColor" ] = Color::BLUE;
map[ "borderSize" ] = 5.0f;
control.background =
{
- rendererType : "border",
+ rendererType : "BORDER",
borderColor : dali.COLOR_BLUE,
borderSize = 5
};
### Properties Supported
-**RendererType** "mesh"
+**RendererType** "MESH"
| Property Name | Type | Required | Description |
|----------------------------------------------|:-------:|:------------------:|--------------------------------------------------------------------------------|
Dali::Property::Map map;
-map[ "rendererType" ] = "mesh";
+map[ "rendererType" ] = "MESH";
map[ "objectUrl" ] = "home/models/Dino.obj";
map[ "materialUrl" ] = "home/models/Dino.mtl";
map[ "texturesPath" ] = "home/images/";
"type":"ImageView",
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "{icon_path}"
},
"position":[20.0, 0.0, 0.0],
"type":"ImageView",
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "{icon_path}"
},
"position":[0.0, -10.0, 0.0],
"type":"ImageView",
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "{icon_path}"
},
"position":[20.0, 0.0, 0.0],
"type":"ImageView",
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "{icon_path}"
},
"position":[0.0, -10.0, 0.0],
var shader = createColorShiftAndZoomEffect();
var image = {
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url" : getImageDirectory()+"gallery-medium-50.jpg",
"shader" : shader
};
dali.stage.add( imageView );
var image = {
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url" : "myImage.jpg",
"desiredWidth" : desiredWidth, // The desired image width while loading (optional but preferable to set for efficiency)
"desiredHeight" : desiredHeight, // The desired image height while loading (optional but preferable to set for efficiency)
"type":"ImageView",
"image":
{
- "rendererType" : "image",
+ "rendererType" : "IMAGE",
"url": "{icon_path}"
},
"position":[20.0, 0.0, 0.0],