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& position, const Vector2& size, const std::string &path, const Vector4& clearColor )
64 GetImpl( *this ).Start( source, position, size, path, clearColor );
67 void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality )
69 GetImpl( *this ).Start( source, Vector2::ZERO, size, path, clearColor, quality );
72 void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor )
74 GetImpl( *this ).Start( source, Vector2::ZERO, size, path, clearColor );
77 void Capture::Start( Actor source, const Vector2& size, const std::string &path )
79 GetImpl( *this ).Start( source, Vector2::ZERO, size, path, Dali::Color::TRANSPARENT );
82 void Capture::SetImageQuality( uint32_t quality )
84 return GetImpl( *this ).SetImageQuality( quality );
87 Dali::NativeImageSourcePtr Capture::GetNativeImageSource() const
89 return GetImpl( *this ).GetNativeImageSource();
92 Capture::CaptureFinishedSignalType& Capture::FinishedSignal()
94 return GetImpl( *this ).FinishedSignal();
97 Capture::Capture( Internal::Adaptor::Capture* internal )
98 : BaseHandle( internal )