2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 #include <dali-toolkit/public-api/controls/image-view/masked-image-view.h>
19 #include <dali-toolkit/internal/controls/image-view/masked-image-view-impl.h>
27 const float MaskedImageView::DEFAULT_MAXIMUM_SOURCE_SCALE(3.0f);
29 MaskedImageView::MaskedImageView()
33 MaskedImageView::MaskedImageView( const MaskedImageView& handle )
38 MaskedImageView& MaskedImageView::operator=( const MaskedImageView& handle )
42 Control::operator=( handle );
47 MaskedImageView::~MaskedImageView()
51 MaskedImageView MaskedImageView::New( unsigned int targetWidth,
52 unsigned int targetHeight,
56 return Internal::MaskedImageView::New( targetWidth, targetHeight, sourceImage, maskImage );
59 MaskedImageView MaskedImageView::DownCast( BaseHandle handle )
61 return Control::DownCast<MaskedImageView, Internal::MaskedImageView>( handle );
64 void MaskedImageView::SetSourceImage( Image sourceImage )
66 GetImpl(*this).SetSourceImage( sourceImage );
69 Image MaskedImageView::GetSourceImage()
71 return GetImpl(*this).GetSourceImage();
74 void MaskedImageView::SetMaskImage( Image sourceImage )
76 GetImpl(*this).SetMaskImage( sourceImage );
79 Image MaskedImageView::GetMaskImage()
81 return GetImpl(*this).GetMaskImage();
84 Property::Index MaskedImageView::GetPropertyIndex( MaskedImageView::CustomProperty customProperty ) const
86 return GetImpl(*this).GetPropertyIndex( customProperty );
89 void MaskedImageView::Pause()
91 GetImpl(*this).Pause();
94 void MaskedImageView::Resume()
96 GetImpl(*this).Resume();
99 bool MaskedImageView::IsPaused() const
101 return GetImpl(*this).IsPaused();
104 void MaskedImageView::SetEditMode( MaskedImageView::EditMode editMode )
106 GetImpl(*this).SetEditMode( editMode );
109 MaskedImageView::EditMode MaskedImageView::GetEditMode() const
111 return GetImpl(*this).GetEditMode();
114 void MaskedImageView::SetSourceAspectRatio( float widthOverHeight )
116 GetImpl(*this).SetSourceAspectRatio( widthOverHeight );
119 float MaskedImageView::GetSourceAspectRatio() const
121 return GetImpl(*this).GetSourceAspectRatio();
124 void MaskedImageView::SetMaximumSourceScale( float scale )
126 GetImpl(*this).SetMaximumSourceScale( scale );
129 float MaskedImageView::GetMaximumSourceScale() const
131 return GetImpl(*this).GetMaximumSourceScale();
134 void MaskedImageView::SetSourceRotation( MaskedImageView::ImageRotation rotation )
136 GetImpl(*this).SetSourceRotation( rotation );
139 MaskedImageView::ImageRotation MaskedImageView::GetSourceRotation() const
141 return GetImpl(*this).GetSourceRotation();
144 Dali::RenderTask::RenderTaskSignalV2& MaskedImageView::RenderFinishedSignal()
146 return GetImpl(*this).RenderFinishedSignal();
149 MaskedImageView::MaskedImageViewSignal& MaskedImageView::MaskFinishedSignal()
151 return GetImpl(*this).MaskFinishedSignal();
154 MaskedImageView::MaskedImageView(Internal::MaskedImageView& implementation)
155 : Control(implementation)
159 MaskedImageView::MaskedImageView( Dali::Internal::CustomActor* internal )
160 : Control( internal )
162 VerifyCustomActorPointer<Internal::MaskedImageView>(internal);
165 } // namespace Toolkit