2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/internal/event/text/text-format.h>
22 #include <dali/internal/event/text/special-characters.h>
30 TextFormat::TextFormat()
35 mUnderlineThickness( 0.f ),
36 mUnderlinePosition( 0.f )
39 TextFormat::TextFormat( bool underline,
41 Dali::Radian italicsAngle,
43 float underlineThickness,
44 float underlinePosition )
45 : mUnderline( underline ),
47 mItalicsAngle( italicsAngle ),
48 mPointSize( pointSize ),
49 mUnderlineThickness( underlineThickness ),
50 mUnderlinePosition( underlinePosition )
54 TextFormat::TextFormat( const TextFormat& rhs )
55 : mUnderline( rhs.mUnderline ),
56 mItalics( rhs.mItalics ),
57 mItalicsAngle( rhs.mItalicsAngle ),
58 mPointSize( rhs.mPointSize ),
59 mUnderlineThickness( rhs.mUnderlineThickness ),
60 mUnderlinePosition( rhs.mUnderlinePosition )
64 TextFormat& TextFormat::operator=( const TextFormat& rhs )
66 mUnderline = rhs.mUnderline;
67 mItalics = rhs.mItalics;
68 mItalicsAngle = rhs.mItalicsAngle;
69 mPointSize = rhs.mPointSize;
70 mUnderlineThickness = rhs.mUnderlineThickness;
71 mUnderlinePosition = rhs.mUnderlinePosition;
76 TextFormat::~TextFormat()
80 bool TextFormat::IsUnderLined() const
85 bool TextFormat::IsItalic() const
90 Dali::Radian TextFormat::GetItalicsAngle() const
95 float TextFormat::GetPointSize() const
100 unsigned int TextFormat::GetUnderLineCharacter() const
102 return SpecialCharacters::UNDERLINE_CHARACTER;
105 float TextFormat::GetUnderlineThickness() const
107 return mUnderlineThickness;
110 float TextFormat::GetUnderlinePosition() const
112 return mUnderlinePosition;
115 } // namespace Internal