Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, color );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, color );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
DALI_TEST_CHECK( value );
DALI_TEST_EQUALS( value->Get<int>(), (int)PrimitiveVisual::Shape::CUBE, TEST_LOCATION );
- value = resultMap.Find( PrimitiveVisual::Property::COLOR, Property::VECTOR4 );
+ value = resultMap.Find( PrimitiveVisual::Property::MIX_COLOR, Property::VECTOR4 );
DALI_TEST_CHECK( value );
DALI_TEST_CHECK( value->Get<Vector4>() == color );
DALI_TEST_EQUALS( value->Get<Vector4>(), color, Math::MACHINE_EPSILON_100, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Renderer renderer = actor.GetRendererAt(0);
- Property::Index index = renderer.GetPropertyIndex( PrimitiveVisual::Property::COLOR );
+ Property::Index index = renderer.GetPropertyIndex( PrimitiveVisual::Property::MIX_COLOR );
// The property isn't registered on the renderer, it's instead registered on the shader.
DALI_TEST_EQUALS( index, Property::INVALID_INDEX, TEST_LOCATION );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
propertyMap.Insert( PrimitiveVisual::Property::STACKS, 20 );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTRUM );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, 40.0f );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::BEVELLED_CUBE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, 0.7f );
//Test to see if shape loads correctly.
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::OCTAHEDRON );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
//Test to see if shape loads correctly.
TestPrimitiveVisualWithProperties( propertyMap, application );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
propertyMap.Insert( PrimitiveVisual::Property::SCALE_HEIGHT, 50.0f );
Property::Map propertyMap;
propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE );
propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE );
- propertyMap.Insert( PrimitiveVisual::Property::COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3( 0.0, 1.0, 2.0 ) );
//Test to see if shape loads correctly.
//Property names
const char * const PRIMITIVE_SHAPE( "shape" );
-const char * const SHAPE_COLOR( "shapeColor" );
+const char * const SHAPE_COLOR( "mixColor" );
const char * const SLICES( "slices" );
const char * const STACKS( "stacks" );
const char * const SCALE_TOP_RADIUS( "scaleTopRadius" );
//Read in other potential properties.
- Property::Value* color = propertyMap.Find( Toolkit::PrimitiveVisual::Property::COLOR, SHAPE_COLOR );
+ Property::Value* color = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, SHAPE_COLOR );
if( color && !color->Get( mColor ) )
{
DALI_LOG_ERROR( "Invalid type for color in PrimitiveVisual.\n" );
map.Clear();
map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::PRIMITIVE );
map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType );
- map.Insert( Toolkit::PrimitiveVisual::Property::COLOR, mColor );
+ map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mColor );
map.Insert( Toolkit::PrimitiveVisual::Property::SLICES, mSlices );
map.Insert( Toolkit::PrimitiveVisual::Property::STACKS, mStacks );
map.Insert( Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS, mScaleTopRadius );
mShader.RegisterProperty( STAGE_OFFSET_UNIFORM_NAME, Vector2( width, height ) / 2.0f );
mShader.RegisterProperty( LIGHT_POSITION_UNIFORM_NAME, mLightPosition );
mShader.RegisterProperty( OBJECT_MATRIX_UNIFORM_NAME, scaleMatrix );
- mShader.RegisterProperty( Toolkit::PrimitiveVisual::Property::COLOR, COLOR_UNIFORM_NAME, mColor );
+ mShader.RegisterProperty( Toolkit::PrimitiveVisual::Property::MIX_COLOR, COLOR_UNIFORM_NAME, mColor );
mShader.RegisterProperty( OBJECT_DIMENSIONS_UNIFORM_NAME, mObjectDimensions );
}