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>
31 Capture Capture::New()
33 Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New();
35 return Capture( internal.Get() );
38 Capture Capture::New( Dali::CameraActor cameraActor )
40 Internal::Adaptor::CapturePtr internal = Internal::Adaptor::Capture::New( cameraActor );
42 return Capture( internal.Get() );
45 Capture Capture::DownCast( BaseHandle handle )
47 return Capture( dynamic_cast< Internal::Adaptor::Capture* >( handle.GetObjectPtr() ) );
54 Capture::Capture( const Capture& copy ) = default;
56 Capture& Capture::operator=( const Capture& rhs ) = default;
58 Capture::Capture( Capture&& rhs ) = default;
60 Capture& Capture::operator=( Capture&& rhs ) = default;
62 void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality )
64 GetImpl( *this ).Start( source, size, path, clearColor, quality );
67 void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
69 GetImpl( *this ).Start( source, size, path, clearColor );
72 void Capture::Start( Actor source, const Vector2& size, const std::string &path )
74 GetImpl( *this ).Start( source, size, path, Dali::Color::TRANSPARENT );
77 Dali::NativeImageSourcePtr Capture::GetNativeImageSource() const
79 return GetImpl( *this ).GetNativeImageSource();
82 Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
84 return GetImpl( *this ).FinishedSignal();
87 Capture::Capture( Internal::Adaptor::Capture* internal )
88 : BaseHandle( internal )