2 * Copyright (c) 2020 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/public-api/capture/capture.h>
22 #include <dali/internal/system/common/capture-impl.h>
30 Capture Capture::New()
32 Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New();
34 return Capture(internal.Get());
37 Capture Capture::New(Dali::CameraActor cameraActor)
39 Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New(cameraActor);
41 return Capture(internal.Get());
44 Capture Capture::DownCast(BaseHandle handle)
46 return Capture(dynamic_cast<Internal::Adaptor::Capture*>(handle.GetObjectPtr()));
53 Capture::Capture(const Capture& copy) = default;
55 Capture& Capture::operator=(const Capture& rhs) = default;
57 Capture::Capture(Capture&& rhs) = default;
59 Capture& Capture::operator=(Capture&& rhs) = default;
61 void Capture::Start(Actor source, const Vector2& position, const Vector2& size, const std::string& path, const Vector4& clearColor)
63 GetImpl(*this).Start(source, position, size, path, clearColor);
66 void Capture::Start(Actor source, const Vector2& size, const std::string& path, const Vector4& clearColor, const uint32_t quality)
68 GetImpl(*this).Start(source, Vector2::ZERO, size, path, clearColor, quality);
71 void Capture::Start(Actor source, const Vector2& size, const std::string& path, const Vector4& clearColor)
73 GetImpl(*this).Start(source, Vector2::ZERO, size, path, clearColor);
76 void Capture::Start(Actor source, const Vector2& size, const std::string& path)
78 GetImpl(*this).Start(source, Vector2::ZERO, size, path, Dali::Color::TRANSPARENT);
81 void Capture::SetImageQuality(uint32_t quality)
83 return GetImpl(*this).SetImageQuality(quality);
86 Dali::NativeImageSourcePtr Capture::GetNativeImageSource() const
88 return GetImpl(*this).GetNativeImageSource();
91 Dali::Texture Capture::GetTexture()
93 return GetImpl(*this).GetTexture();
96 Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
98 return GetImpl(*this).FinishedSignal();
101 Capture::Capture(Internal::Adaptor::Capture* internal)
102 : BaseHandle(internal)