Emscripten workarounds and llvm syntax fixes
[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 Flora License, Version 1.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://floralicense.org/license/
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 namespace Dali
21 {
22
23 namespace Internal
24 {
25
26 /*
27  * Paint style used for certain nodes
28  */
29 struct PaintStyle
30 {
31   /**
32    * Default constructor, initializes everything to zero
33    */
34   PaintStyle()
35   : mStyleMode( STYLE_1x1 ),
36     mFadeIn(false),
37     mFadeInTime(0),
38     mBorderX0( 0.0f ), mBorderY0( 0.0f ), mBorderX1( 0.0f ), mBorderY1( 0.0f ),
39     mClipX0( 0.0f ), mClipY0( 0.0f ), mClipX1( 0.0f ), mClipY1( 0.0f )
40   { }
41
42   enum StyleMode
43   {
44      STYLE_1x1,
45      STYLE_3x1,
46      STYLE_1x3,
47      STYLE_3x3,
48      STYLE_GRID,
49      STYLE_BORDER_1x1
50   };
51
52   StyleMode   mStyleMode;
53   bool        mFadeIn;                      ///< whether to fade the image in
54   unsigned int mFadeInTime;                 ///< how quickly to fade an image in, in milliseconds
55
56   float       mBorderX0;  // Border for 3x3 grid
57   float       mBorderY0;
58   float       mBorderX1;
59   float       mBorderY1;
60
61   float       mClipX0;  // clip region for centre rectangle
62   float       mClipY0;
63   float       mClipX1;
64   float       mClipY1;
65 };
66
67 } // namespace Dali
68
69 } // namespace Internal
70
71 #endif // __DALI_INTERNAL_RENDERING_TYPES_H__