4 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #include "util-color-image.h"
21 using namespace ClusterHome3D ;
22 namespace ClusterHome3D
24 Dali::Toolkit::ImageView CreateSolidColorActor( const Vector4& color, bool border, const Vector4& borderColor, const unsigned int borderSize )
27 Toolkit::ImageView imageView = Toolkit::ImageView::New();
28 Property::Map solidColorProperty;
29 solidColorProperty.Insert( "renderer-type", "color-renderer" );
30 solidColorProperty.Insert( "blend-color",color);
31 imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, solidColorProperty );
34 Dali::Toolkit::ImageView CreateTestSolidColorActor()
36 Toolkit::ImageView imageView = Toolkit::ImageView::New();
37 imageView.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
38 imageView.SetAnchorPoint(AnchorPoint::CENTER);
39 imageView.SetParentOrigin(ParentOrigin::CENTER);
40 imageView.SetPosition(0.0f, 0.0f, 0.5f);
41 Property::Map solidColorProperty;
42 solidColorProperty.Insert( "renderer-type", "color-renderer" );
43 solidColorProperty.Insert( "blend-color",Vector4((float)(rand()%10)/10, (float)(rand()%10)/10, (float)(rand()%10)/10, 0.5f));
44 imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, solidColorProperty );