From: Paul Wisbey
Date: Tue, 26 May 2015 14:28:30 +0000 (-0700)
Subject: Merge "Move TextSelectionPopup from public to devel" into tizen
X-Git-Tag: accepted/tizen/common/20150529.134100~7
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=ca85044443ecab7375b63c0a1c946c99a8bb77a4;hp=2b4be89fbaad622c93c957ad425a485ba0cc8bd4
Merge "Move TextSelectionPopup from public to devel" into tizen
---
diff --git a/build/tizen/dali-toolkit/Makefile.am b/build/tizen/dali-toolkit/Makefile.am
index 2165644..0614d96 100644
--- a/build/tizen/dali-toolkit/Makefile.am
+++ b/build/tizen/dali-toolkit/Makefile.am
@@ -126,7 +126,6 @@ publicapialignmentdir = $(publicapicontrolsdir)/alignment
publicapibuttonsdir = $(publicapicontrolsdir)/buttons
publicapidefaultcontrolsdir = $(publicapicontrolsdir)/default-controls
publicapigaussianblurviewdir = $(publicapicontrolsdir)/gaussian-blur-view
-publicapiimageviewdir = $(publicapicontrolsdir)/image-view
publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar
publicapiscrollabledir = $(publicapicontrolsdir)/scrollable
publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view
@@ -143,7 +142,6 @@ publicapialignment_HEADERS = $(public_api_alignment_header_files)
publicapibuttons_HEADERS = $(public_api_buttons_header_files)
publicapidefaultcontrols_HEADERS = $(public_api_default_controls_header_files)
publicapigaussianblurview_HEADERS = $(public_api_gaussian_blur_view_header_files)
-publicapiimageview_HEADERS = $(public_api_image_view_header_files)
publicapiitemview_HEADERS = $(public_api_item_view_header_files)
publicapiscrollbar_HEADERS = $(public_api_scroll_bar_header_files)
publicapiscrollable_HEADERS = $(public_api_scrollable_header_files)
diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h
index 9cef6c3..5fc233b 100644
--- a/dali-toolkit/dali-toolkit.h
+++ b/dali-toolkit/dali-toolkit.h
@@ -30,7 +30,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp b/dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp
deleted file mode 100644
index 97c4053..0000000
--- a/dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include
-
-// EXTERNAL INCLUDES
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace // unnamed namespace
-{
-
-const char* CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::CUSTOM_PROPERTY_COUNT ] =
-{
- "background-color",
- "source-size",
- "source-offset",
- "mask-size",
- "mask-offset"
-};
-
-const char* const MASKED_IMAGE_VIEW_VERTEX_SOURCE =
- "precision mediump float; \n"
- "uniform vec2 uTargetSize; \n"
- "uniform vec2 uSourceSize; \n"
- "uniform vec2 uSourceOffset; \n"
- "uniform vec2 uMaskSize; \n"
- "uniform vec2 uMaskOffset; \n"
- "varying vec2 vMaskTexCoord; \n"
- "void main() \n"
- "{ \n"
- " float x = uSourceSize.x*aPosition.x + uSourceOffset.x; \n"
- " float y = uSourceSize.y*aPosition.y + uSourceOffset.y; \n"
- " \n"
- " gl_Position = vec4( x/(uTargetSize.x*0.5), y/(uTargetSize.y*0.5), 0.0, 1.0 ); \n"
- " \n"
- " vMaskTexCoord.x = (uMaskSize.x*0.5 + x - uMaskOffset.x) / uMaskSize.x; \n"
- " vMaskTexCoord.y = (uMaskSize.y*0.5 + y - uMaskOffset.y) / uMaskSize.y; \n";
-
-const char* const MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE0 =
- " \n"
- " vTexCoord = aTexCoord; \n"
- "}";
-
-const char* const MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE90 =
- " \n"
- " vTexCoord.x = aTexCoord.y; \n"
- " vTexCoord.y = 1.0 - aTexCoord.x; \n"
- "}";
-
-const char* const MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE180 =
- " \n"
- " vTexCoord.x = 1.0 - aTexCoord.x; \n"
- " vTexCoord.y = 1.0 - aTexCoord.y; \n"
- "}";
-
-const char* const MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE270 =
- " \n"
- " vTexCoord.x = 1.0 - aTexCoord.y; \n"
- " vTexCoord.y = aTexCoord.x; \n"
- "}";
-
-const char* const MASKED_IMAGE_VIEW_FRAGMENT_SOURCE =
- "precision mediump float; \n"
- "varying vec2 vMaskTexCoord; \n"
- "void main() \n"
- "{ \n"
- " highp vec4 mask = texture2D(sEffect, vMaskTexCoord); \n"
- " gl_FragColor = texture2D(sTexture, vTexCoord) * vec4(1,1,1,mask.a); \n"
- "}";
-
-Vector2 GetSizeForAspectRatio( const Vector2& targetSize, float aspectRatio )
-{
- Vector2 sizeToKeepAspectRatio( targetSize );
-
- float targetAspectRatio( targetSize.width / targetSize.height );
-
- if( aspectRatio > targetAspectRatio )
- {
- sizeToKeepAspectRatio.width = sizeToKeepAspectRatio.height * aspectRatio;
- }
- else if ( aspectRatio < targetAspectRatio )
- {
- sizeToKeepAspectRatio.height = sizeToKeepAspectRatio.width / aspectRatio;
- }
-
- return sizeToKeepAspectRatio;
-}
-
-Vector2 ClampSourceSize( const Vector2& sourceSize, const Vector2& targetSize, float widthOverHeight, float maxSourceScale )
-{
- Vector2 clampedSize( sourceSize );
-
- Vector2 minSize( targetSize );
- if ( widthOverHeight > 0.0f )
- {
- minSize = GetSizeForAspectRatio( targetSize, widthOverHeight );
- }
-
- if ( clampedSize.width < minSize.width ||
- clampedSize.height < minSize.height )
- {
- clampedSize = minSize;
- }
- else if ( clampedSize.width > minSize.width *maxSourceScale ||
- clampedSize.height > minSize.height*maxSourceScale )
- {
- clampedSize = minSize * maxSourceScale;
- }
-
- return clampedSize;
-}
-
-Vector2 ClampSourceOffset( const Vector2& sourceOffset, const Vector2& targetSize, const Vector2& sourceSize )
-{
- Vector2 min, max;
-
- if ( sourceSize.width > targetSize.width )
- {
- float offset = (sourceSize.width - targetSize.width) * 0.5f;
- min.x = -offset;
- max.x = offset;
- }
-
- if ( sourceSize.height > targetSize.height )
- {
- float offset = (sourceSize.height - targetSize.height) * 0.5f;
- min.y = -offset;
- max.y = offset;
- }
-
- return Vector2( Clamp(sourceOffset.x, min.x, max.x), Clamp(sourceOffset.y, min.y, max.y) );
-}
-
-} // unnamed namespace
-
-Dali::Toolkit::MaskedImageView MaskedImageView::New( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage )
-{
- // Create the implementation
- MaskedImageView* maskedImageView = new MaskedImageView();
-
- // Pass ownership to CustomActor via derived handle
- Dali::Toolkit::MaskedImageView handle(*maskedImageView);
-
- // Second-phase init of the implementation
- // This can only be done after the CustomActor connection has been made...
- maskedImageView->Initialize( targetWidth, targetHeight, sourceImage, maskImage );
-
- return handle;
-}
-
-void MaskedImageView::SetSourceImage( Image sourceImage )
-{
- mSourceImageActor.SetImage( sourceImage );
-}
-
-Image MaskedImageView::GetSourceImage()
-{
- return mSourceImageActor.GetImage();
-}
-
-void MaskedImageView::SetMaskImage( Image maskImage )
-{
- mMaskImage = maskImage;
- mSourceImageActor.GetShaderEffect().SetEffectImage( maskImage );
-}
-
-Image MaskedImageView::GetMaskImage()
-{
- return mMaskImage;
-}
-
-Property::Index MaskedImageView::GetPropertyIndex( Dali::Toolkit::MaskedImageView::CustomProperty customProperty ) const
-{
- Property::Index index = Property::INVALID_INDEX;
-
- switch ( customProperty )
- {
- case Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR:
- {
- index = mCustomProperties[ Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR ];
- break;
- }
-
- case Dali::Toolkit::MaskedImageView::SOURCE_SIZE:
- {
- index = mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_SIZE ];
- break;
- }
-
- case Dali::Toolkit::MaskedImageView::SOURCE_OFFSET:
- {
- index = mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ];
- break;
- }
-
- case Dali::Toolkit::MaskedImageView::MASK_SIZE:
- {
- index = mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_SIZE ];
- break;
- }
-
- case Dali::Toolkit::MaskedImageView::MASK_OFFSET:
- {
- index = mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_OFFSET ];
- break;
- }
-
- default:
- break;
- }
-
- return index;
-}
-
-void MaskedImageView::Pause()
-{
- if ( mRenderTask )
- {
- mRenderTask.SetRefreshRate( RenderTask::REFRESH_ONCE );
- }
-}
-
-void MaskedImageView::Resume()
-{
- if ( mRenderTask )
- {
- mRenderTask.SetRefreshRate( RenderTask::REFRESH_ALWAYS );
- }
-}
-
-bool MaskedImageView::IsPaused() const
-{
- if( mRenderTask.GetRefreshRate() ) // REFRESH_ALWAYS
- {
- return false;
- }
- else // REFRESH_ONCE
- {
- return true;
- }
-}
-
-void MaskedImageView::SetEditMode( Dali::Toolkit::MaskedImageView::EditMode editMode )
-{
- Actor self = Self();
-
- mEditMode = editMode;
-
- if ( Dali::Toolkit::MaskedImageView::EDIT_DISABLED == editMode )
- {
- if ( mPanGestureDetector )
- {
- mPanGestureDetector.DetachAll();
- mPanGestureDetector.Reset();
- }
-
- if ( mPinchDetector )
- {
- mPinchDetector.DetachAll();
- mPinchDetector.Reset();
- }
- }
- else
- {
- if ( !mPanGestureDetector )
- {
- mPanGestureDetector = PanGestureDetector::New();
- mPanGestureDetector.Attach( self );
- mPanGestureDetector.DetectedSignal().Connect(this, &MaskedImageView::OnPan);
- }
-
- if ( !mPinchDetector )
- {
- mPinchDetector = PinchGestureDetector::New();
- mPinchDetector.Attach( self );
- mPinchDetector.DetectedSignal().Connect(this, &MaskedImageView::OnPinch);
- }
-
- if( Dali::Toolkit::MaskedImageView::EDIT_SOURCE == editMode )
- {
- // Re-clamp values to preserve image aspect-ratio etc.
- ClampSourceSizeAndOffset();
- }
- }
-}
-
-Dali::Toolkit::MaskedImageView::EditMode MaskedImageView::GetEditMode() const
-{
- return mEditMode;
-}
-
-void MaskedImageView::OnPropertySet( Property::Index index, Property::Value propertyValue )
-{
- // Ignore OnPropertySet if MaskedImageView is setting the properties
- if( !mSelfPropertySetting )
- {
- // Synchronize with user-supplied property values...
- if( mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_SIZE ] == index )
- {
- // Note that clamping will take effect when edit-mode is used later
- mSourcePosition.mStartPinchSize = propertyValue.Get();
- mSourcePosition.mCurrentPinchSize = propertyValue.Get();
- }
- else if( mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ] == index )
- {
- // Note that clamping will take effect when edit-mode is used later
- mSourcePosition.mPanOffset = propertyValue.Get();
- }
- else if( mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_SIZE ] == index )
- {
- mMaskPosition.mStartPinchSize = propertyValue.Get();
- mMaskPosition.mCurrentPinchSize = propertyValue.Get();
- }
- else if( mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_OFFSET ] == index )
- {
- mMaskPosition.mPanOffset = propertyValue.Get();
- }
- // else it's fine to do nothing here
- }
-}
-
-void MaskedImageView::OnPan(Actor source, const PanGesture& gesture)
-{
- // Used to flag whether edit mode is setting properties
- mSelfPropertySetting = true;
-
- Actor self = Self();
-
- if ( Dali::Toolkit::MaskedImageView::EDIT_SOURCE == mEditMode )
- {
- mSourcePosition.mPanOffset += gesture.displacement;
- mSourcePosition.mPanOffset = ClampSourceOffset( mSourcePosition.mPanOffset, mTargetSize, mSourcePosition.mCurrentPinchSize );
-
- self.SetProperty( GetPropertyIndex( Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ), mSourcePosition.mPanOffset );
- }
- else // Edit mask
- {
- mMaskPosition.mPanOffset += gesture.displacement;
-
- self.SetProperty( GetPropertyIndex( Dali::Toolkit::MaskedImageView::MASK_OFFSET ), mMaskPosition.mPanOffset );
- }
-
- // Used to flag whether edit mode is setting properties
- mSelfPropertySetting = false;
-}
-
-void MaskedImageView::OnPinch(Actor actor, const PinchGesture& pinch)
-{
- // Used to flag whether edit mode is setting properties
- mSelfPropertySetting = true;
-
- Actor self = Self();
-
- if ( Dali::Toolkit::MaskedImageView::EDIT_SOURCE == mEditMode )
- {
- if ( pinch.state == Gesture::Started )
- {
- mSourcePosition.mStartPinchSize = mSourcePosition.mCurrentPinchSize;
- }
-
- mSourcePosition.mCurrentPinchSize = mSourcePosition.mStartPinchSize * pinch.scale;
-
- ClampSourceSizeAndOffset();
- }
- else // Edit mask
- {
- if ( pinch.state == Gesture::Started )
- {
- mMaskPosition.mStartPinchSize = mMaskPosition.mCurrentPinchSize;
- }
-
- mMaskPosition.mCurrentPinchSize = mMaskPosition.mStartPinchSize * pinch.scale;
-
- self.SetProperty( GetPropertyIndex( Dali::Toolkit::MaskedImageView::MASK_SIZE ), mMaskPosition.mCurrentPinchSize );
- }
-
- // Used to flag whether edit mode is setting properties
- mSelfPropertySetting = false;
-}
-
-void MaskedImageView::SetSourceAspectRatio( float widthOverHeight )
-{
- Actor self = Self();
-
- if ( widthOverHeight > 0.0f )
- {
- mWidthOverHeight = widthOverHeight;
-
- ClampSourceSizeAndOffset();
- }
- else
- {
- mWidthOverHeight = 0.0f; // ignore aspect-ratio
- }
-}
-
-float MaskedImageView::GetSourceAspectRatio() const
-{
- return mWidthOverHeight;
-}
-
-void MaskedImageView::SetMaximumSourceScale( float scale )
-{
- mMaximumSourceScale = scale;
-}
-
-float MaskedImageView::GetMaximumSourceScale() const
-{
- return mMaximumSourceScale;
-}
-
-void MaskedImageView::SetSourceRotation( MaskedImageView::ImageRotation newRotation )
-{
- if( mSourceRotation != newRotation )
- {
- bool oldLandscape( Dali::Toolkit::MaskedImageView::ROTATE_90 == mSourceRotation || Dali::Toolkit::MaskedImageView::ROTATE_270 == mSourceRotation );
- bool newLandscape( Dali::Toolkit::MaskedImageView::ROTATE_90 == newRotation || Dali::Toolkit::MaskedImageView::ROTATE_270 == newRotation );
-
- if ( oldLandscape != newLandscape )
- {
- // Changing between landscape & portraint, swap width & height
- float temp = mSourcePosition.mCurrentPinchSize.width;
- mSourcePosition.mCurrentPinchSize.width = mSourcePosition.mCurrentPinchSize.height;
- mSourcePosition.mCurrentPinchSize.height = temp;
- }
-
- mSourceRotation = newRotation;
-
- ApplyMaskedImageShader( newRotation );
-
- ClampSourceSizeAndOffset();
- }
-}
-
-MaskedImageView::ImageRotation MaskedImageView::GetSourceRotation() const
-{
- return mSourceRotation;
-}
-
-Dali::Toolkit::MaskedImageView::MaskedImageViewSignal& MaskedImageView::MaskFinishedSignal()
-{
- return mMaskFinishedSignal;
-}
-
-MaskedImageView::MaskedImageView()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
- mEditMode( Dali::Toolkit::MaskedImageView::EDIT_DISABLED ),
- mSelfPropertySetting( false ),
- mSourceRotation( Dali::Toolkit::MaskedImageView::ROTATE_0 ),
- mWidthOverHeight( 0.0f ),
- mMaximumSourceScale( Dali::Toolkit::MaskedImageView::DEFAULT_MAXIMUM_SOURCE_SCALE )
-{
-}
-
-void MaskedImageView::Initialize( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage )
-{
- Actor self = Self();
-
- // Register custom properties
-
- mTargetSize = Vector2( static_cast(targetWidth), static_cast(targetHeight) );
-
- mCustomProperties[ Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR ]
- = self.RegisterProperty( CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR ], Color::BLACK );
-
- mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_SIZE ]
- = self.RegisterProperty( CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::SOURCE_SIZE ], mTargetSize );
-
- mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ]
- = self.RegisterProperty( CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ], Vector2::ZERO );
-
- mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_SIZE ]
- = self.RegisterProperty( CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::MASK_SIZE ], mTargetSize );
-
- mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_OFFSET ]
- = self.RegisterProperty( CUSTOM_PROPERTY_NAMES[ Dali::Toolkit::MaskedImageView::MASK_OFFSET ], Vector2::ZERO );
-
- // Create destination image (FBO)
- mDestinationImage = FrameBufferImage::New( targetWidth, targetHeight, Pixel::RGBA8888 );
-
- // Create source actor for off-screen image processing
- mSourceImageActor = ImageActor::New( sourceImage );
- self.Add( mSourceImageActor );
- mSourceImageActor.SetParentOrigin( ParentOrigin::CENTER );
- mSourceImageActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
- mSourceImageActor.SetInheritOrientation( false );
- mSourceImageActor.SetInheritScale( false );
- mSourceImageActor.SetColorMode( USE_OWN_COLOR );
- mSourceImageActor.SetSize( Vector3::ONE );
-
- // Apply masking effect to source actor
- mMaskImage = maskImage;
- ApplyMaskedImageShader( Dali::Toolkit::MaskedImageView::ROTATE_0 );
-
- // Create actor to display result of off-screen rendering
- mDestinationImageActor = ImageActor::New( mDestinationImage );
- self.Add( mDestinationImageActor );
- mDestinationImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-
- // Start the masking operation
- mRenderTask = Stage::GetCurrent().GetRenderTaskList().CreateTask();
- mRenderTask.SetSourceActor( mSourceImageActor );
- mRenderTask.SetTargetFrameBuffer( mDestinationImage );
- mRenderTask.SetInputEnabled( false );
- mRenderTask.SetExclusive( true );
- mRenderTask.SetClearEnabled( true );
-
- Constraint clearColorConstraint = Constraint::New( mRenderTask, RenderTask::Property::CLEAR_COLOR, EqualToConstraint() );
- clearColorConstraint.AddSource( Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::BACKGROUND_COLOR ] ) );
- clearColorConstraint.Apply();
- mRenderTask.FinishedSignal().Connect( this, &MaskedImageView::OnRenderTaskFinished );
-
- // Edit mode initialization
- mSourcePosition.mCurrentPinchSize = Vector2( targetWidth, targetHeight );
- mMaskPosition.mCurrentPinchSize = mSourcePosition.mCurrentPinchSize;
-}
-
-void MaskedImageView::ApplyMaskedImageShader( ImageRotation rotation )
-{
- Actor self = Self();
-
- // Vertex shader has different postfix for each rotation
- std::stringstream vertexSource;
- vertexSource << MASKED_IMAGE_VIEW_VERTEX_SOURCE;
- if( Dali::Toolkit::MaskedImageView::ROTATE_90 == rotation )
- {
- vertexSource << MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE90;
- }
- else if( Dali::Toolkit::MaskedImageView::ROTATE_180 == rotation )
- {
- vertexSource << MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE180;
- }
- else if( Dali::Toolkit::MaskedImageView::ROTATE_270 == rotation )
- {
- vertexSource << MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE270;
- }
- else // Default to Dali::Toolkit::MaskedImageView::ROTATE_0
- {
- vertexSource << MASKED_IMAGE_VIEW_VERTEX_SOURCE_ROTATE0;
- }
-
- ShaderEffect shader = ShaderEffect::New( vertexSource.str(),
- MASKED_IMAGE_VIEW_FRAGMENT_SOURCE,
- GeometryType( GEOMETRY_TYPE_IMAGE ),
- ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
-
- shader.SetUniform( "uTargetSize", mTargetSize );
-
- shader.SetUniform( "uSourceSize", mTargetSize );
- Constraint sourceSizeConstraint = Constraint::New( shader, shader.GetPropertyIndex( "uSourceSize" ), EqualToConstraint() );
- sourceSizeConstraint.AddSource( Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_SIZE ] ) );
- sourceSizeConstraint.Apply();
-
- shader.SetUniform( "uSourceOffset", Vector2::ZERO );
- Constraint sourceOffsetConstraint = Constraint::New( shader, shader.GetPropertyIndex( "uSourceOffset" ), EqualToConstraint() );
- sourceOffsetConstraint.AddSource( Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ] ) );
- sourceOffsetConstraint.Apply();
-
- shader.SetUniform( "uMaskSize", mTargetSize );
- Constraint maskSizeConstraint = Constraint::New( shader, shader.GetPropertyIndex( "uMaskSize" ), EqualToConstraint() );
- maskSizeConstraint.AddSource( Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_SIZE ] ) );
- maskSizeConstraint.Apply();
-
- shader.SetUniform( "uMaskOffset", mTargetSize );
- Constraint maskOffsetConstraint = Constraint::New( shader, shader.GetPropertyIndex( "uMaskOffset" ), EqualToConstraint() );
- maskOffsetConstraint.AddSource( Source( self, mCustomProperties[ Dali::Toolkit::MaskedImageView::MASK_OFFSET ] ) );
- maskOffsetConstraint.Apply();
-
- shader.SetEffectImage( mMaskImage );
- mSourceImageActor.SetShaderEffect( shader );
-}
-
-void MaskedImageView::ClampSourceSizeAndOffset()
-{
- float rotatedAspectRatio( mWidthOverHeight );
- if( mWidthOverHeight > 0.0f &&
- ( Dali::Toolkit::MaskedImageView::ROTATE_90 == mSourceRotation ||
- Dali::Toolkit::MaskedImageView::ROTATE_270 == mSourceRotation ) )
- {
- rotatedAspectRatio = 1.0f / mWidthOverHeight;
- }
-
- Actor self = Self();
-
- mSourcePosition.mCurrentPinchSize = ClampSourceSize( mSourcePosition.mCurrentPinchSize, mTargetSize, rotatedAspectRatio, mMaximumSourceScale );
- self.SetProperty( GetPropertyIndex( Dali::Toolkit::MaskedImageView::SOURCE_SIZE ), mSourcePosition.mCurrentPinchSize );
-
- mSourcePosition.mPanOffset = ClampSourceOffset( mSourcePosition.mPanOffset, mTargetSize, mSourcePosition.mCurrentPinchSize );
- self.SetProperty( GetPropertyIndex( Dali::Toolkit::MaskedImageView::SOURCE_OFFSET ), mSourcePosition.mPanOffset );
-}
-
-MaskedImageView::~MaskedImageView()
-{
- // Guard to allow handle destruction after Core has been destroyed
- if( Stage::IsInstalled() )
- {
- Stage::GetCurrent().GetRenderTaskList().RemoveTask( mRenderTask );
- }
-}
-
-void MaskedImageView::OnControlSizeSet( const Vector3& targetSize )
-{
- mDestinationImageActor.SetSize(targetSize);
-}
-
-void MaskedImageView::OnRenderTaskFinished( Dali::RenderTask& renderTask )
-{
- Toolkit::MaskedImageView handle( GetOwner() );
- mMaskFinishedSignal.Emit( handle );
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/internal/controls/image-view/masked-image-view-impl.h b/dali-toolkit/internal/controls/image-view/masked-image-view-impl.h
deleted file mode 100644
index a1c8285..0000000
--- a/dali-toolkit/internal/controls/image-view/masked-image-view-impl.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_MASKED_IMAGE_VIEW_H__
-#define __DALI_TOOLKIT_INTERNAL_MASKED_IMAGE_VIEW_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include
-#include
-#include
-
-// INTERNAL INCLUDES
-#include
-#include
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-/**
- * @copydoc Dali::Toolkit::MaskedImageView
- */
-class MaskedImageView : public Control
-{
-public:
-
- typedef Dali::Toolkit::MaskedImageView::ImageRotation ImageRotation;
-
- /**
- * Create a new MaskedImageView.
- * @return A public handle to the newly allocated MaskedImageView.
- */
- static Dali::Toolkit::MaskedImageView New( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetSourceImage()
- */
- void SetSourceImage( Image sourceImage );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetSourceImage()
- */
- Image GetSourceImage();
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetMaskImage()
- */
- void SetMaskImage( Image maskImage );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetMaskImage()
- */
- Image GetMaskImage();
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetPropertyIndex()
- */
- Property::Index GetPropertyIndex( Dali::Toolkit::MaskedImageView::CustomProperty customProperty ) const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::Pause()
- */
- void Pause();
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::Resume()
- */
- void Resume();
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::IsPaused()
- */
- bool IsPaused() const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetEditMode()
- */
- void SetEditMode( Dali::Toolkit::MaskedImageView::EditMode editMode );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetEditMode()
- */
- Dali::Toolkit::MaskedImageView::EditMode GetEditMode() const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetSourceAspectRatio()
- */
- void SetSourceAspectRatio( float widthOverHeight );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetSourceAspectRatio()
- */
- float GetSourceAspectRatio() const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetMaximumSourceScale()
- */
- void SetMaximumSourceScale( float scale );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetMaximumSourceScale()
- */
- float GetMaximumSourceScale() const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::SetSourceRotation()
- */
- void SetSourceRotation( ImageRotation rotation );
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::GetSourceRotation()
- */
- ImageRotation GetSourceRotation() const;
-
- /**
- * @copydoc Dali::Toolkit::MaskedImageView::MaskFinishedSignal
- */
- Dali::Toolkit::MaskedImageView::MaskedImageViewSignal& MaskFinishedSignal();
-
-protected:
-
- /**
- * @copydoc Dali::CustomActorImpl::OnPropertySet()
- */
- void OnPropertySet( Property::Index index, Property::Value propertyValue );
-
- /**
- * Helper for edit mode.
- */
- void OnPan( Actor source, const PanGesture& gesture );
-
- /**
- * Helper for edit mode.
- */
- void OnPinch( Actor actor, const PinchGesture& pinch );
-
- /**
- * Construct a new MaskedImageView.
- */
- MaskedImageView();
-
- /**
- * 2nd-phase initialization.
- */
- void Initialize( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage );
-
- /**
- * Helper to apply the desired shader-effect for a given rotation.
- * @param[in] rotation The rotation to apply to the source image.
- */
- void ApplyMaskedImageShader( ImageRotation rotation );
-
- /**
- * Helper to clamp the source image properties (only in edit mode).
- */
- void ClampSourceSizeAndOffset();
-
- /**
- * A reference counted object may only be deleted by calling Unreference()
- */
- virtual ~MaskedImageView();
-
- /**
- *
- * @copydoc Toolkit::Control::OnControlSizeSet( const Vector3& targetSize )
- */
- virtual void OnControlSizeSet( const Vector3& targetSize );
-
-private:
-
- // Undefined
- MaskedImageView(const MaskedImageView&);
-
- // Undefined
- MaskedImageView& operator=(const MaskedImageView& rhs);
-
- /**
- * Emit MaskFinishedSignal when the render task finished rendering
- * @param[in] renderTask the off-screen render task
- */
- void OnRenderTaskFinished( Dali::RenderTask& renderTask );
-
-private:
-
- Vector2 mTargetSize;
-
- Property::Index mCustomProperties[ Dali::Toolkit::MaskedImageView::CUSTOM_PROPERTY_COUNT ];
-
- // Used for off-screen rendering
- RenderTask mRenderTask;
- ImageActor mSourceImageActor;
- FrameBufferImage mDestinationImage;
-
- // Create actor to display result of off-screen rendering
- ImageActor mDestinationImageActor;
-
- // Because ShaderEffect doesn't have a GetEffectImage()
- Image mMaskImage;
-
- // For edit mode
- Dali::Toolkit::MaskedImageView::EditMode mEditMode;
- PanGestureDetector mPanGestureDetector;
- PinchGestureDetector mPinchDetector;
- bool mSelfPropertySetting;
-
- struct ImagePosition
- {
- Vector2 mPanOffset;
- Vector2 mStartPinchSize;
- Vector2 mCurrentPinchSize;
- };
- ImagePosition mSourcePosition;
- ImagePosition mMaskPosition;
-
- ImageRotation mSourceRotation;
-
- // Limits for edit mode
- float mWidthOverHeight;
- float mMaximumSourceScale;
-
- Dali::Toolkit::MaskedImageView::MaskedImageViewSignal mMaskFinishedSignal;
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Toolkit::Internal::MaskedImageView& GetImpl(Toolkit::MaskedImageView& pub)
-{
- DALI_ASSERT_ALWAYS(pub);
-
- Dali::RefObject& handle = pub.GetImplementation();
-
- return static_cast(handle);
-}
-
-inline const Toolkit::Internal::MaskedImageView& GetImpl(const Toolkit::MaskedImageView& pub)
-{
- DALI_ASSERT_ALWAYS(pub);
-
- const Dali::RefObject& handle = pub.GetImplementation();
-
- return static_cast(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_MASKED_IMAGE_VIEW_H__
diff --git a/dali-toolkit/internal/file.list b/dali-toolkit/internal/file.list
index b39bf81..c748177 100644
--- a/dali-toolkit/internal/file.list
+++ b/dali-toolkit/internal/file.list
@@ -21,7 +21,6 @@ toolkit_src_files = \
$(toolkit_src_dir)/controls/buttons/radio-button-impl.cpp \
$(toolkit_src_dir)/controls/effects-view/effects-view-impl.cpp \
$(toolkit_src_dir)/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp \
- $(toolkit_src_dir)/controls/image-view/masked-image-view-impl.cpp \
$(toolkit_src_dir)/controls/magnifier/magnifier-impl.cpp \
$(toolkit_src_dir)/controls/popup/popup-impl.cpp \
$(toolkit_src_dir)/controls/popup/popup-style-impl.cpp \
diff --git a/dali-toolkit/public-api/controls/image-view/masked-image-view.cpp b/dali-toolkit/public-api/controls/image-view/masked-image-view.cpp
deleted file mode 100644
index 1b7bd37..0000000
--- a/dali-toolkit/public-api/controls/image-view/masked-image-view.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include
-#include
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-const float MaskedImageView::DEFAULT_MAXIMUM_SOURCE_SCALE(3.0f);
-
-MaskedImageView::MaskedImageView()
-{
-}
-
-MaskedImageView::MaskedImageView( const MaskedImageView& handle )
-: Control( handle )
-{
-}
-
-MaskedImageView& MaskedImageView::operator=( const MaskedImageView& handle )
-{
- if( &handle != this )
- {
- Control::operator=( handle );
- }
- return *this;
-}
-
-MaskedImageView::~MaskedImageView()
-{
-}
-
-MaskedImageView MaskedImageView::New( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage )
-{
- return Internal::MaskedImageView::New( targetWidth, targetHeight, sourceImage, maskImage );
-}
-
-MaskedImageView MaskedImageView::DownCast( BaseHandle handle )
-{
- return Control::DownCast( handle );
-}
-
-void MaskedImageView::SetSourceImage( Image sourceImage )
-{
- GetImpl(*this).SetSourceImage( sourceImage );
-}
-
-Image MaskedImageView::GetSourceImage()
-{
- return GetImpl(*this).GetSourceImage();
-}
-
-void MaskedImageView::SetMaskImage( Image sourceImage )
-{
- GetImpl(*this).SetMaskImage( sourceImage );
-}
-
-Image MaskedImageView::GetMaskImage()
-{
- return GetImpl(*this).GetMaskImage();
-}
-
-Property::Index MaskedImageView::GetPropertyIndex( MaskedImageView::CustomProperty customProperty ) const
-{
- return GetImpl(*this).GetPropertyIndex( customProperty );
-}
-
-void MaskedImageView::Pause()
-{
- GetImpl(*this).Pause();
-}
-
-void MaskedImageView::Resume()
-{
- GetImpl(*this).Resume();
-}
-
-bool MaskedImageView::IsPaused() const
-{
- return GetImpl(*this).IsPaused();
-}
-
-void MaskedImageView::SetEditMode( MaskedImageView::EditMode editMode )
-{
- GetImpl(*this).SetEditMode( editMode );
-}
-
-MaskedImageView::EditMode MaskedImageView::GetEditMode() const
-{
- return GetImpl(*this).GetEditMode();
-}
-
-void MaskedImageView::SetSourceAspectRatio( float widthOverHeight )
-{
- GetImpl(*this).SetSourceAspectRatio( widthOverHeight );
-}
-
-float MaskedImageView::GetSourceAspectRatio() const
-{
- return GetImpl(*this).GetSourceAspectRatio();
-}
-
-void MaskedImageView::SetMaximumSourceScale( float scale )
-{
- GetImpl(*this).SetMaximumSourceScale( scale );
-}
-
-float MaskedImageView::GetMaximumSourceScale() const
-{
- return GetImpl(*this).GetMaximumSourceScale();
-}
-
-void MaskedImageView::SetSourceRotation( MaskedImageView::ImageRotation rotation )
-{
- GetImpl(*this).SetSourceRotation( rotation );
-}
-
-MaskedImageView::ImageRotation MaskedImageView::GetSourceRotation() const
-{
- return GetImpl(*this).GetSourceRotation();
-}
-
-MaskedImageView::MaskedImageViewSignal& MaskedImageView::MaskFinishedSignal()
-{
- return GetImpl(*this).MaskFinishedSignal();
-}
-
-MaskedImageView::MaskedImageView(Internal::MaskedImageView& implementation)
-: Control(implementation)
-{
-}
-
-MaskedImageView::MaskedImageView( Dali::Internal::CustomActor* internal )
-: Control( internal )
-{
- VerifyCustomActorPointer(internal);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/public-api/controls/image-view/masked-image-view.h b/dali-toolkit/public-api/controls/image-view/masked-image-view.h
deleted file mode 100644
index b4e6208..0000000
--- a/dali-toolkit/public-api/controls/image-view/masked-image-view.h
+++ /dev/null
@@ -1,301 +0,0 @@
-#ifndef __DALI_TOOLKIT_MASKED_IMAGE_VIEW_H__
-#define __DALI_TOOLKIT_MASKED_IMAGE_VIEW_H__
-
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-class MaskedImageView;
-}
-
-/**
- * @brief MaskedImageView displays the result of an image created from a masking operation.
- *
- * Masking operations:
- * - Firstly a target image size is chosen. The MaskedImageView handles the creation of this image internally. Initially the
- * target image will be filled according to the BACKGROUND_COLOR property.
- * - A source image is provided and positioned with the target image area. The position of the source image (in pixels), can
- * be controlled using the SOURCE_OFFSET and SOURCE_SIZE properties. By default the source image is centered within the target
- * image, and stretched to fill. Note that by default, no attempt is made to maintain the aspect ratio of the source image.
- * - A mask image is provided and positioned in the same way as the source image, using the MASK_OFFSET and MASK_SIZE properties.
- * - Conceptually the source image is then painted using the mask image as a stencil. Areas of the source which overlap with opaque
- * areas of the mask, will be painted into the target image. However where the mask is transparent, the source will be faded away.
- * Note that the edge of the mask image will be stretched to cover the entire target area.
- *
- * Initially MaskedImageView will perform the masking operation on a per-frame basis. This can impact performance, and may be
- * avoided by calling Pause() e.g. when the source & mask positions are not being modified. The Resume() method can then be called
- * to continue the masking operation when required.
- */
-class DALI_IMPORT_API MaskedImageView : public Control
-{
-public:
-
- /**
- * @brief The custom properties installed by this control.
- */
- enum CustomProperty
- {
- BACKGROUND_COLOR, ///< Name "background-color", type Vector4
- SOURCE_SIZE, ///< Name "source-size", type Vector2
- SOURCE_OFFSET, ///< Name "source-offset", type Vector2
- MASK_SIZE, ///< Name "mask-size", type Vector2
- MASK_OFFSET, ///< Name "mask-offset", type Vector2
-
- CUSTOM_PROPERTY_COUNT
- };
-
- /**
- * @brief Edit mode for this control.
- *
- * @see SetEditMode()
- */
- enum EditMode
- {
- EDIT_DISABLED, ///< Editting is disabled
- EDIT_SOURCE, ///< Editting affects the source image
- EDIT_MASK ///< Editting affects the mask
- };
-
- /**
- * @brief The rotation of the image.
- *
- * @see SetSourceRotation()
- */
- enum ImageRotation
- {
- ROTATE_0, ///< No rotation
- ROTATE_90, ///< Image is rotated clockwise by 90 degrees
- ROTATE_180, ///< Image is rotated clockwise by 180 degrees
- ROTATE_270 ///< Image is rotated clockwise by 270 degrees
- };
-
- static const float DEFAULT_MAXIMUM_SOURCE_SCALE; ///< Default SetMaximumSourceScale() value
-
- /**
- * @brief Creates an empty MaskedImageView handle.
- */
- MaskedImageView();
-
- /**
- * @brief Copy constructor.
- *
- * Creates another handle that points to the same real object
- * @param handle to copy from
- */
- MaskedImageView( const MaskedImageView& handle );
-
- /**
- * @brief Assignment operator.
- *
- * Changes this handle to point to another real object
- * @param[in] handle the handle of the object to re-assign this to
- * @return a reference to this
- */
- MaskedImageView& operator=( const MaskedImageView& handle );
-
- /**
- * @brief Destructor
- *
- * This is non-virtual since derived Handle types must not contain data or virtual methods.
- */
- ~MaskedImageView();
-
- /**
- * @brief Create the MaskedImageView control.
- *
- * @param[in] targetWidth The width of the target image
- * @param[in] targetHeight The height of the target image
- * @param[in] sourceImage The source image
- * @param[in] maskImage The mask image
- * @return A handle to the MaskedImageView control.
- */
- static MaskedImageView New( unsigned int targetWidth,
- unsigned int targetHeight,
- Image sourceImage,
- Image maskImage );
-
- /**
- * @brief Downcast an Object handle to MaskedImageView.
- *
- * If handle points to an MaskedImageView the downcast produces
- * valid handle. If not the returned handle is left uninitialized.
- *
- * @param[in] handle Handle to an object
- * @return handle to a MaskedImageView or an uninitialized handle
- */
- static MaskedImageView DownCast( BaseHandle handle );
-
- /**
- * @brief Set the image used as a source in the masking operation.
- *
- * @param[in] sourceImage The source image
- */
- void SetSourceImage( Image sourceImage );
-
- /**
- * @brief Retrieve the image used as a source in the masking operation.
- *
- * @return sourceImage The source image
- */
- Image GetSourceImage();
-
- /**
- * @brief Set the image used as a mask in the masking operation.
- *
- * @param[in] maskImage The mask image
- */
- void SetMaskImage( Image maskImage );
-
- /**
- * @brief Retrieve the image used as a mask in the masking operation.
- *
- * @return sourceImage The mask image
- */
- Image GetMaskImage();
-
- /**
- * @brief Get the property index for a custom MaskedImageView property.
- *
- * @param[in] customProperty A custom property enum defined in this class.
- * @return The property index e.g. for use with Animation::AnimateTo()
- */
- Dali::Property::Index GetPropertyIndex( CustomProperty customProperty ) const;
-
- /**
- * @brief Pause the masking operation to improve performance.
- *
- * Call this when the source & mask positions etc. are not being modified.
- */
- void Pause();
-
- /**
- * @brief Resume the masking operation.
- *
- */
- void Resume();
-
- /**
- * @brief Query whether the masking operation has been paused.
- *
- * @return True if the masking operation has been paused.
- */
- bool IsPaused() const;
-
- /**
- * @brief Enable or disable an edit mode.
- *
- * The default is EDIT_DISABLED.
- * @param[in] editMode The edit mode required.
- */
- void SetEditMode( EditMode editMode );
-
- /**
- * @brief Query which edit mode is enabled.
- */
- EditMode GetEditMode() const;
-
- /**
- * @brief Set the aspect ratio to be preserved when editing the source image.
- *
- * @param[in] widthOverHeight The aspect ratio i.e. width divided by height. If a value
- * of zero or less is set, then the aspect ratio of the source image will be ignored.
- */
- void SetSourceAspectRatio( float widthOverHeight );
-
- /**
- * @brief Query the aspect ratio preserved when editing the source image.
- *
- * @return The aspect ratio (width divided by height) or zero if no aspect ratio is set.
- */
- float GetSourceAspectRatio() const;
-
- /**
- * @brief Set the maximum scale applied when editing the source image.
- *
- * The minimum scale is implied by the target width/height i.e. the source image will
- * always fill that area when edit mode is enabled.
- * @param[in] scale The maximum scale.
- */
- void SetMaximumSourceScale( float scale );
-
- /**
- * @brief Query the maximum scale applied when editing the source image.
- *
- * @return The maximum scale.
- */
- float GetMaximumSourceScale() const;
-
- /**
- * @brief Set the rotation applied to the source image.
- *
- * @param[in] rotation The new rotation; by default the source image is not rotated (ROTATE_0).
- */
- void SetSourceRotation( ImageRotation rotation );
-
- /**
- * @brief Query the rotation applied to the source image.
- *
- * @return The current rotation.
- */
- ImageRotation GetSourceRotation() const;
-
-public: /* Signals */
-
- /// @brief Finished signal type.
- typedef Signal< void (MaskedImageView& source) > MaskedImageViewSignal;
-
- /**
- * @brief Signal emitted when the render task which targets the
- * frame buffer of the masked image has finished.
- *
- * This signal carries information of the control handle to the callback function.
- * @return the signal
- */
- MaskedImageViewSignal& MaskFinishedSignal();
-
-public: // Not intended for application developers
-
- /**
- * @brief Creates a handle using the Toolkit::Internal implementation.
- *
- * @param[in] implementation The Control implementation.
- */
- DALI_INTERNAL MaskedImageView(Internal::MaskedImageView& implementation);
-
- /**
- * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
- *
- * @param[in] internal A pointer to the internal CustomActor.
- */
- explicit DALI_INTERNAL MaskedImageView(Dali::Internal::CustomActor* internal);
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_MASKED_IMAGE_VIEW_H__
diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list
index 3bd88d8..d64c5d2 100755
--- a/dali-toolkit/public-api/file.list
+++ b/dali-toolkit/public-api/file.list
@@ -23,7 +23,6 @@ public_api_src_files = \
$(public_api_src_dir)/controls/text-controls/text-label.cpp \
$(public_api_src_dir)/controls/text-controls/text-field.cpp \
$(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.cpp \
- $(public_api_src_dir)/controls/image-view/masked-image-view.cpp \
$(public_api_src_dir)/focus-manager/focus-manager.cpp \
$(public_api_src_dir)/focus-manager/keyboard-focus-manager.cpp \
$(public_api_src_dir)/focus-manager/keyinput-focus-manager.cpp \
@@ -55,9 +54,6 @@ public_api_default_controls_header_files = \
public_api_gaussian_blur_view_header_files = \
$(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.h
-public_api_image_view_header_files = \
- $(public_api_src_dir)/controls/image-view/masked-image-view.h
-
public_api_item_view_header_files = \
$(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \
$(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \