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/background-color-span.h>
22 #include <dali-toolkit/internal/text/spannable/spans/background-color-span-impl.h>
30 BackgroundColorSpan BackgroundColorSpan::New(const Vector4 &color)
32 return Internal::BackgroundColorSpan::New(color);
35 BackgroundColorSpan::BackgroundColorSpan(Internal::BackgroundColorSpan* internal)
40 BackgroundColorSpan::BackgroundColorSpan() = default;
42 BackgroundColorSpan::BackgroundColorSpan(const BackgroundColorSpan& rhs) = default;
44 BackgroundColorSpan::BackgroundColorSpan(BackgroundColorSpan&& rhs) = default;
46 BackgroundColorSpan& BackgroundColorSpan::operator=(const BackgroundColorSpan& rhs) = default;
48 BackgroundColorSpan& BackgroundColorSpan::operator=(BackgroundColorSpan&& rhs) = default;
50 BackgroundColorSpan::~BackgroundColorSpan() = default;
53 const Vector4 BackgroundColorSpan::GetBackgroundColor() const
55 return GetImplementation(*this).GetBackgroundColor();
58 bool BackgroundColorSpan::IsBackgroundColorDefined() const
60 return GetImplementation(*this).IsBackgroundColorDefined();
63 BackgroundColorSpan BackgroundColorSpan::DownCast(BaseHandle handle)
65 return BackgroundColorSpan(dynamic_cast<Dali::Toolkit::Text::Internal::BackgroundColorSpan*>(handle.GetObjectPtr()));
70 } // namespace Toolkit