1 #ifndef __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_H__
2 #define __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_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/controls/renderers/control-renderer-impl.h>
34 * The renderer 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 * | blend-color | VECTOR4 |
42 class ColorRenderer: public ControlRenderer
52 * @brief A reference counted object may only be deleted by calling Unreference().
54 virtual ~ColorRenderer();
56 public: // from ControlRenderer
59 * @copydoc ControlRenderer::Initialize
61 virtual void Initialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap );
64 * @copydoc ControlRenderer::SetSize
66 virtual void SetSize( const Vector2& size );
69 * @copydoc ControlRenderer::SetClipRect
71 virtual void SetClipRect( const Rect<int>& clipRect );
74 * @copydoc ControlRenderer::SetOffset
76 virtual void SetOffset( const Vector2& offset );
79 * @copydoc ControlRenderer::CreatePropertyMap
81 virtual void CreatePropertyMap( Property::Map& map ) const;
85 * @copydoc ControlRenderer::DoSetOnStage
87 virtual void DoSetOnStage( Actor& actor );
92 * Request the geometry and shader from the cache, if not available, create and save to the cache for sharing.
94 * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object
96 void Initialize( RendererFactoryCache& factoryCache );
99 * Set the color for rendering.
100 * @param[in] color The color to be rendered.
102 void SetColor( const Vector4& color );
107 ColorRenderer( const ColorRenderer& colorRenderer );
110 ColorRenderer& operator=( const ColorRenderer& colorRenderer );
115 Property::Index mBlendColorIndex;
119 } // namespace Internal
121 } // namespace Toolkit
125 #endif /* __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_H__ */