2 * Copyright (c) 2014 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/public-api/controls/image-view/masked-image-view.h>
20 #include <dali-toolkit/internal/controls/image-view/masked-image-view-impl.h>
28 const float MaskedImageView::DEFAULT_MAXIMUM_SOURCE_SCALE(3.0f);
30 MaskedImageView::MaskedImageView()
34 MaskedImageView::MaskedImageView( const MaskedImageView& handle )
39 MaskedImageView& MaskedImageView::operator=( const MaskedImageView& handle )
43 Control::operator=( handle );
48 MaskedImageView::~MaskedImageView()
52 MaskedImageView MaskedImageView::New( unsigned int targetWidth,
53 unsigned int targetHeight,
57 return Internal::MaskedImageView::New( targetWidth, targetHeight, sourceImage, maskImage );
60 MaskedImageView MaskedImageView::DownCast( BaseHandle handle )
62 return Control::DownCast<MaskedImageView, Internal::MaskedImageView>( handle );
65 void MaskedImageView::SetSourceImage( Image sourceImage )
67 GetImpl(*this).SetSourceImage( sourceImage );
70 Image MaskedImageView::GetSourceImage()
72 return GetImpl(*this).GetSourceImage();
75 void MaskedImageView::SetMaskImage( Image sourceImage )
77 GetImpl(*this).SetMaskImage( sourceImage );
80 Image MaskedImageView::GetMaskImage()
82 return GetImpl(*this).GetMaskImage();
85 Property::Index MaskedImageView::GetPropertyIndex( MaskedImageView::CustomProperty customProperty ) const
87 return GetImpl(*this).GetPropertyIndex( customProperty );
90 void MaskedImageView::Pause()
92 GetImpl(*this).Pause();
95 void MaskedImageView::Resume()
97 GetImpl(*this).Resume();
100 bool MaskedImageView::IsPaused() const
102 return GetImpl(*this).IsPaused();
105 void MaskedImageView::SetEditMode( MaskedImageView::EditMode editMode )
107 GetImpl(*this).SetEditMode( editMode );
110 MaskedImageView::EditMode MaskedImageView::GetEditMode() const
112 return GetImpl(*this).GetEditMode();
115 void MaskedImageView::SetSourceAspectRatio( float widthOverHeight )
117 GetImpl(*this).SetSourceAspectRatio( widthOverHeight );
120 float MaskedImageView::GetSourceAspectRatio() const
122 return GetImpl(*this).GetSourceAspectRatio();
125 void MaskedImageView::SetMaximumSourceScale( float scale )
127 GetImpl(*this).SetMaximumSourceScale( scale );
130 float MaskedImageView::GetMaximumSourceScale() const
132 return GetImpl(*this).GetMaximumSourceScale();
135 void MaskedImageView::SetSourceRotation( MaskedImageView::ImageRotation rotation )
137 GetImpl(*this).SetSourceRotation( rotation );
140 MaskedImageView::ImageRotation MaskedImageView::GetSourceRotation() const
142 return GetImpl(*this).GetSourceRotation();
145 MaskedImageView::MaskedImageViewSignal& MaskedImageView::MaskFinishedSignal()
147 return GetImpl(*this).MaskFinishedSignal();
150 MaskedImageView::MaskedImageView(Internal::MaskedImageView& implementation)
151 : Control(implementation)
155 MaskedImageView::MaskedImageView( Dali::Internal::CustomActor* internal )
156 : Control( internal )
158 VerifyCustomActorPointer<Internal::MaskedImageView>(internal);
161 } // namespace Toolkit