1 #ifndef DALI_TOOLKIT_INTERNAL_COLOR_VISUAL_H
2 #define DALI_TOOLKIT_INTERNAL_COLOR_VISUAL_H
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
34 * The visual which renders a solid color to the control's quad
36 * The following properties are required for create a ColorRender
38 * | %Property Name | Type |
39 * |-----------------|-------------|
40 * | mixColor | VECTOR4 |
42 class ColorVisual: public Visual::Base
49 * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
51 ColorVisual( VisualFactoryCache& factoryCache );
54 * @brief A reference counted object may only be deleted by calling Unreference().
56 virtual ~ColorVisual();
58 public: // from Visual
61 * @copydoc Visual::SetSize
63 virtual void SetSize( const Vector2& size );
66 * @copydoc Visual::SetClipRect
68 virtual void SetClipRect( const Rect<int>& clipRect );
71 * @copydoc Visual::SetOffset
73 virtual void SetOffset( const Vector2& offset );
76 * @copydoc Visual::CreatePropertyMap
78 virtual void DoCreatePropertyMap( Property::Map& map ) const;
83 * @copydoc Visual::DoInitialize
85 virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
88 * @copydoc Visual::DoSetOnStage
90 virtual void DoSetOnStage( Actor& actor );
95 * Set the color for rendering.
96 * @param[in] color The color to be rendered.
98 void SetColor( const Vector4& color );
102 * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing.
104 void InitializeRenderer();
109 ColorVisual( const ColorVisual& colorRenderer );
112 ColorVisual& operator=( const ColorVisual& colorRenderer );
117 Property::Index mMixColorIndex;
121 } // namespace Internal
123 } // namespace Toolkit
127 #endif /* DALI_TOOLKIT_INTERNAL_COLOR_VISUAL_H */