9cc88701b996ad78a7aca3160ee82523abb9394d
[platform/core/uifw/dali-toolkit.git] / 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 Flora License, Version 1.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://floralicense.org/license/
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 // INTERNAL INCLUDES
18 #include "text-view-processor-types.h"
19
20 namespace Dali
21 {
22
23 namespace Toolkit
24 {
25
26 namespace Internal
27 {
28
29 namespace TextViewProcessor
30 {
31
32 /////////////////////
33 // Layout info.
34 /////////////////////
35
36 CharacterLayoutInfo::CharacterLayoutInfo()
37 : mHeight( 0.f ),
38   mAdvance( 0.f ),
39   mBearing( 0.f ),
40   mPosition(),
41   mOffset(),
42   mSize(),
43   mAscender( 0.f ),
44   mUnderlineThickness( 0.f ),
45   mUnderlinePosition( 0.f ),
46   mGlyphActor(),
47   mStyledText(),
48   mColorAlpha( 1.f ),
49   mGradientColor(),
50   mStartPoint(),
51   mEndPoint(),
52   mIsVisible( true ),
53   mSetText( true ),
54   mSetStyle( true ),
55   mIsColorGlyph( false )
56 {
57 }
58
59 CharacterLayoutInfo::CharacterLayoutInfo( const CharacterLayoutInfo& character )
60 : mHeight( character.mHeight ),
61   mAdvance( character.mAdvance ),
62   mBearing( character.mBearing ),
63   mPosition( character.mPosition ),
64   mOffset( character.mOffset ),
65   mSize( character.mSize ),
66   mAscender( character.mAscender ),
67   mUnderlineThickness( character.mUnderlineThickness ),
68   mUnderlinePosition( character.mUnderlinePosition ),
69   mGlyphActor( character.mGlyphActor ),
70   mStyledText( character.mStyledText ),
71   mColorAlpha( character.mColorAlpha ),
72   mGradientColor( character.mGradientColor ),
73   mStartPoint( character.mStartPoint ),
74   mEndPoint( character.mEndPoint ),
75   mIsVisible( character.mIsVisible ),
76   mSetText( character.mSetText ),
77   mSetStyle( character.mSetStyle ),
78   mIsColorGlyph( character.mIsColorGlyph )
79 {
80 }
81
82 CharacterLayoutInfo& CharacterLayoutInfo::operator=( const CharacterLayoutInfo& character )
83 {
84   mHeight = character.mHeight;
85   mAdvance = character.mAdvance;
86   mBearing = character.mBearing;
87
88   mPosition = character.mPosition;
89   mOffset = character.mOffset;
90   mSize = character.mSize;
91   mAscender = character.mAscender;
92   mUnderlineThickness = character.mUnderlineThickness;
93   mUnderlinePosition = character.mUnderlinePosition;
94
95   mStyledText = character.mStyledText;
96   mColorAlpha = character.mColorAlpha;
97   mGradientColor = character.mGradientColor;
98   mStartPoint = character.mStartPoint;
99   mEndPoint = character.mEndPoint;
100   mIsVisible = character.mIsVisible;
101   mSetText = character.mSetText;
102   mSetStyle = character.mSetStyle;
103   mIsColorGlyph = character.mIsColorGlyph;
104
105   mGlyphActor = character.mGlyphActor;
106
107   return *this;
108 }
109
110 } //namespace TextViewProcessor
111
112 } //namespace Internal
113
114 } //namespace Toolkit
115
116 } //namespace Dali