Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / internal / event / text / glyph-metric.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 // CLASS HEADER
18 #include <dali/internal/event/text/glyph-metric.h>
19
20 namespace Dali
21 {
22
23 namespace Internal
24 {
25
26 GlyphMetric::GlyphMetric()
27 : mCode(0),
28   mWidth(0.0f),
29   mHeight(0.0f),
30   mTop(0.0f),
31   mLeft(0.0f),
32   mXAdvance(0.0f)
33 {
34 }
35
36 GlyphMetric::~GlyphMetric()
37 {
38 }
39
40 GlyphMetric::GlyphMetric( uint32_t characterCode,
41                           float    width,
42                           float    height,
43                           float    top,
44                           float    left,
45                           float    xAdvance)
46 : mCode( characterCode ),
47   mWidth( width ),
48   mHeight( height ),
49   mTop( top ),
50   mLeft( left ),
51   mXAdvance( xAdvance )
52 {
53 }
54
55 uint32_t GlyphMetric::GetCharacterCode() const
56 {
57   return mCode;
58 }
59
60 float GlyphMetric::GetWidth() const
61 {
62   return mWidth;
63 }
64
65 float GlyphMetric::GetHeight() const
66 {
67   return mHeight;
68 }
69
70 float GlyphMetric::GetTop() const
71 {
72   return mTop;
73 }
74
75 float GlyphMetric::GetLeft() const
76 {
77   return mLeft;
78 }
79
80 float GlyphMetric::GetXAdvance() const
81 {
82   return mXAdvance;
83 }
84
85 } // namespace Internal
86
87 } // namespace Dali