X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol-impl.cpp;h=3aa01efa11de56d906235df189caabad357bdd5b;hp=19f2619af728e4ff5836f80ac8e8654073f57e95;hb=refs%2Fchanges%2F91%2F37591%2F3;hpb=7f336e4318945301ac6ecc5bcb19bdb3eb120be1 diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 19f2619..3aa01ef 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -21,11 +21,9 @@ // EXTERNAL INCLUDES #include #include -#include #include #include #include -#include #include #include #include @@ -94,36 +92,6 @@ struct Background } }; -/** - * Creates a white coloured Mesh. - */ -Mesh CreateMesh() -{ - Vector3 white( Color::WHITE ); - - MeshData meshData; - - // Create vertices with a white color (actual color is set by actor color) - MeshData::VertexContainer vertices(4); - vertices[ 0 ] = MeshData::Vertex( Vector3( -0.5f, -0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 1 ] = MeshData::Vertex( Vector3( 0.5f, -0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 2 ] = MeshData::Vertex( Vector3( -0.5f, 0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 3 ] = MeshData::Vertex( Vector3( 0.5f, 0.5f, 0.0f ), Vector2::ZERO, white ); - - // Specify all the faces - MeshData::FaceIndices faces; - faces.reserve( 6 ); // 2 triangles in Quad - faces.push_back( 0 ); faces.push_back( 3 ); faces.push_back( 1 ); - faces.push_back( 0 ); faces.push_back( 2 ); faces.push_back( 3 ); - - // Create the mesh data from the vertices and faces - meshData.SetMaterial( Material::New( "ControlMaterial" ) ); - meshData.SetVertices( vertices ); - meshData.SetFaceIndices( faces ); - meshData.SetHasColor( true ); - - return Mesh::New( meshData ); -} /** * Sets all the required properties for the background actor. @@ -496,17 +464,6 @@ void Control::SetBackgroundColor( const Vector4& color ) // Just set the actor color background.actor.SetColor( color ); } - else - { - // Create Mesh Actor - MeshActor meshActor = MeshActor::New( CreateMesh() ); - - SetupBackgroundActor( meshActor, Actor::Property::SCALE, color ); - - // Set the background actor before adding so that we do not inform deriving classes - background.actor = meshActor; - Self().Add( meshActor ); - } background.color = color; }