2 * Copyright (c) 2022 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-toolkit/devel-api/text/spans/underline-span.h>
22 #include <dali-toolkit/internal/text/spannable/spans/underline-span-impl.h>
30 UnderlineSpan UnderlineSpan::New()
32 return Internal::UnderlineSpan::New();
35 UnderlineSpan UnderlineSpan::NewSolid(Vector4 color, float height)
37 return Internal::UnderlineSpan::NewSolid(color, height);
40 UnderlineSpan UnderlineSpan::NewDashed(Vector4 color, float height, float dashGap, float dashWidth)
42 return Internal::UnderlineSpan::NewDashed(color, height, dashGap, dashWidth);
45 UnderlineSpan UnderlineSpan::NewDouble(Vector4 color, float height)
47 return Internal::UnderlineSpan::NewDouble(color, height);
50 UnderlineSpan::UnderlineSpan(Internal::UnderlineSpan* internal)
55 UnderlineSpan::UnderlineSpan() = default;
57 UnderlineSpan::UnderlineSpan(const UnderlineSpan& rhs) = default;
59 UnderlineSpan::UnderlineSpan(UnderlineSpan&& rhs) = default;
61 UnderlineSpan& UnderlineSpan::operator=(const UnderlineSpan& rhs) = default;
63 UnderlineSpan& UnderlineSpan::operator=(UnderlineSpan&& rhs) = default;
65 UnderlineSpan::~UnderlineSpan() = default;
69 const Text::Underline::Type UnderlineSpan::GetType() const
71 return GetImplementation(*this).GetType();
74 bool UnderlineSpan::IsTypeDefined() const
76 return GetImplementation(*this).IsTypeDefined();
79 const Vector4 UnderlineSpan::GetColor() const
81 return GetImplementation(*this).GetColor();
84 bool UnderlineSpan::IsColorDefined() const
86 return GetImplementation(*this).IsColorDefined();
89 const float UnderlineSpan::GetHeight() const
91 return GetImplementation(*this).GetHeight();
94 bool UnderlineSpan::IsHeightDefined() const
96 return GetImplementation(*this).IsHeightDefined();
99 const float UnderlineSpan::GetDashGap() const
101 return GetImplementation(*this).GetDashGap();
104 bool UnderlineSpan::IsDashGapDefined() const
106 return GetImplementation(*this).IsDashGapDefined();
109 const float UnderlineSpan::GetDashWidth() const
111 return GetImplementation(*this).GetDashWidth();
114 bool UnderlineSpan::IsDashWidthDefined() const
116 return GetImplementation(*this).IsDashWidthDefined();
119 UnderlineSpan UnderlineSpan::DownCast(BaseHandle handle)
121 return UnderlineSpan(dynamic_cast<Dali::Toolkit::Text::Internal::UnderlineSpan*>(handle.GetObjectPtr()));
126 } // namespace Toolkit