Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[platform/core/uifw/dali-core.git] / dali / internal / render / common / rendering-types.h
1 #ifndef __DALI_INTERNAL_RENDERING_TYPES_H__
2 #define __DALI_INTERNAL_RENDERING_TYPES_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 namespace Dali
22 {
23
24 namespace Internal
25 {
26
27 /*
28  * Paint style used for certain nodes
29  */
30 struct PaintStyle
31 {
32   /**
33    * Default constructor, initializes everything to zero
34    */
35   PaintStyle()
36   : mStyleMode( STYLE_1x1 ),
37     mFadeIn(false),
38     mFadeInTime(0),
39     mBorderX0( 0.0f ), mBorderY0( 0.0f ), mBorderX1( 0.0f ), mBorderY1( 0.0f ),
40     mClipX0( 0.0f ), mClipY0( 0.0f ), mClipX1( 0.0f ), mClipY1( 0.0f )
41   { }
42
43   enum StyleMode
44   {
45      STYLE_1x1,
46      STYLE_3x1,
47      STYLE_1x3,
48      STYLE_3x3,
49      STYLE_GRID,
50      STYLE_BORDER_1x1
51   };
52
53   StyleMode   mStyleMode;
54   bool        mFadeIn;                      ///< whether to fade the image in
55   unsigned int mFadeInTime;                 ///< how quickly to fade an image in, in milliseconds
56
57   float       mBorderX0;  // Border for 3x3 grid
58   float       mBorderY0;
59   float       mBorderX1;
60   float       mBorderY1;
61
62   float       mClipX0;  // clip region for centre rectangle
63   float       mClipY0;
64   float       mClipX1;
65   float       mClipY1;
66 };
67
68 } // namespace Dali
69
70 } // namespace Internal
71
72 #endif // __DALI_INTERNAL_RENDERING_TYPES_H__