Fixes TextView's includes.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / text-view-character-processor.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // INTERNAL INCLUDES
19 #include <dali-toolkit/internal/controls/text-view/text-view-processor-types.h>
20
21 namespace Dali
22 {
23
24 namespace Toolkit
25 {
26
27 namespace Internal
28 {
29
30 namespace TextViewProcessor
31 {
32
33 /////////////////////
34 // Layout info.
35 /////////////////////
36
37 CharacterLayoutInfo::CharacterLayoutInfo()
38 : mHeight( 0.f ),
39   mAdvance( 0.f ),
40   mBearing( 0.f ),
41   mPosition(),
42   mOffset(),
43   mSize(),
44   mAscender( 0.f ),
45   mUnderlineThickness( 0.f ),
46   mUnderlinePosition( 0.f ),
47   mGlyphActor(),
48   mStyledText(),
49   mColorAlpha( 1.f ),
50   mGradientColor(),
51   mStartPoint(),
52   mEndPoint(),
53   mIsVisible( true ),
54   mSetText( true ),
55   mSetStyle( true ),
56   mIsColorGlyph( false )
57 {
58 }
59
60 CharacterLayoutInfo::CharacterLayoutInfo( const CharacterLayoutInfo& character )
61 : mHeight( character.mHeight ),
62   mAdvance( character.mAdvance ),
63   mBearing( character.mBearing ),
64   mPosition( character.mPosition ),
65   mOffset( character.mOffset ),
66   mSize( character.mSize ),
67   mAscender( character.mAscender ),
68   mUnderlineThickness( character.mUnderlineThickness ),
69   mUnderlinePosition( character.mUnderlinePosition ),
70   mGlyphActor( character.mGlyphActor ),
71   mStyledText( character.mStyledText ),
72   mColorAlpha( character.mColorAlpha ),
73   mGradientColor( character.mGradientColor ),
74   mStartPoint( character.mStartPoint ),
75   mEndPoint( character.mEndPoint ),
76   mIsVisible( character.mIsVisible ),
77   mSetText( character.mSetText ),
78   mSetStyle( character.mSetStyle ),
79   mIsColorGlyph( character.mIsColorGlyph )
80 {
81 }
82
83 CharacterLayoutInfo& CharacterLayoutInfo::operator=( const CharacterLayoutInfo& character )
84 {
85   mHeight = character.mHeight;
86   mAdvance = character.mAdvance;
87   mBearing = character.mBearing;
88
89   mPosition = character.mPosition;
90   mOffset = character.mOffset;
91   mSize = character.mSize;
92   mAscender = character.mAscender;
93   mUnderlineThickness = character.mUnderlineThickness;
94   mUnderlinePosition = character.mUnderlinePosition;
95
96   mStyledText = character.mStyledText;
97   mColorAlpha = character.mColorAlpha;
98   mGradientColor = character.mGradientColor;
99   mStartPoint = character.mStartPoint;
100   mEndPoint = character.mEndPoint;
101   mIsVisible = character.mIsVisible;
102   mSetText = character.mSetText;
103   mSetStyle = character.mSetStyle;
104   mIsColorGlyph = character.mIsColorGlyph;
105
106   mGlyphActor = character.mGlyphActor;
107
108   return *this;
109 }
110
111 } //namespace TextViewProcessor
112
113 } //namespace Internal
114
115 } //namespace Toolkit
116
117 } //namespace Dali