TestPageFactory factory(application);
Vector2 size = Stage::GetCurrent().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
- portraitView.SetPositionInheritanceMode( USE_PARENT_POSITION );
+ portraitView.SetParentOrigin( ParentOrigin::CENTER );
Stage::GetCurrent().Add( portraitView );
// Render and notify
tet_infoline(" UtcDaliPageTurnLanscapeViewSignals ");
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
-
/***
* -----------------
* | |
TestPageFactory factory(application);
Vector2 stageSize = Stage::GetCurrent().GetSize();
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
- landscapeView.SetPositionInheritanceMode( USE_PARENT_POSITION );;
+ landscapeView.SetParentOrigin( ParentOrigin::CENTER );
Stage::GetCurrent().Add( landscapeView );
// Render and notify
Image borderImage = ResourceImage::New(FOCUS_BORDER_IMAGE_PATH);
ImageActor focusIndicator = ImageActor::New(borderImage);
- focusIndicator.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+ focusIndicator.SetParentOrigin( ParentOrigin::CENTER );
focusIndicator.SetStyle( ImageActor::STYLE_NINE_PATCH );
focusIndicator.SetNinePatchBorder(FOCUS_BORDER_IMAGE_BORDER);
focusIndicator.SetPosition(Vector3(0.0f, 0.0f, 1.0f));
void BloomView::OnInitialize()
{
// root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
- mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Create actors
// Create an ImageActor for rendering from the scene texture to the bloom texture
mBloomExtractImageActor = Toolkit::ImageView::New();
- mBloomExtractImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mBloomExtractImageActor.SetParentOrigin( ParentOrigin::CENTER );
// Create shader used for extracting the bright parts of an image
Property::Map customShader;
// Create an ImageActor for compositing the result (scene and bloom textures) to output
mCompositeImageActor = Toolkit::ImageView::New();
- mCompositeImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mCompositeImageActor.SetParentOrigin( ParentOrigin::CENTER );
// Create shader used to composite bloom and original image to output render target
customShader[ "fragmentShader" ] = COMPOSITE_FRAGMENT_SOURCE;
// Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
mTargetImageActor = Toolkit::ImageView::New();
- mTargetImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-
+ mTargetImageActor.SetParentOrigin( ParentOrigin::CENTER );
// Create the Gaussian Blur object + render tasks
// Note that we use mBloomExtractTarget as the source image and also re-use this as the gaussian blur final render target. This saves the gaussian blur code from creating it
// render targets etc internally, so we make better use of resources
// Note, this also internally creates the render tasks used by the Gaussian blur, this must occur after the bloom extraction and before the compositing
mGaussianBlurView = Dali::Toolkit::GaussianBlurView::New(mBlurNumSamples, mBlurBellCurveWidth, mPixelFormat, mDownsampleWidthScale, mDownsampleHeightScale, true);
- mGaussianBlurView.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mGaussianBlurView.SetParentOrigin( ParentOrigin::CENTER );
//////////////////////////////////////////////////////
mCameraForChildren.SetParentOrigin(ParentOrigin::CENTER);
mActorForChildren = ImageActor::New();
- mActorForChildren.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mActorForChildren.SetParentOrigin( ParentOrigin::CENTER );
mActorForChildren.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mActorPostFilter = ImageActor::New();
Actor self(Self());
mFrame = Actor::New( );
- mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
+ mFrame.SetInheritPosition(false);
mFrame.SetInheritScale(true);
mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
if( 0 < newPage.GetChildCount() )
{
ImageActor backImage = ImageActor::DownCast( newPage.GetChildAt( 0 ) );
- backImage.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+ backImage.SetParentOrigin( ParentOrigin::CENTER );
backImage.SetSize( mPageSize );
SetCullFace( backImage, CullFront );
backImage.SetZ( 0.25f * STATIC_PAGE_INTERVAL_DISTANCE );
mShadowView.SetShadowColor(DEFAULT_SHADOW_COLOR);
mShadowPlaneBackground = Actor::New();
- mShadowPlaneBackground.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+ mShadowPlaneBackground.SetParentOrigin( ParentOrigin::CENTER );
mShadowPlaneBackground.SetSize( mControlSize );
Self().Add( mShadowPlaneBackground );
mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground );
backing.SetName( "popupBacking" );
// Must always be positioned top-left of stage, regardless of parent.
- backing.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
+ backing.SetInheritPosition(false);
backing.SetAnchorPoint( AnchorPoint::TOP_LEFT );
// Always the full size of the stage.
void ShadowView::OnInitialize()
{
// root actor to parent all user added actors. Used as source actor for shadow render task.
- mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
mChildrenRoot.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Vector2 stageSize = Stage::GetCurrent().GetSize();
mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
// Turn off inheritance to ensure filter renders properly
- mBlurRootActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
+ mBlurRootActor.SetParentOrigin( ParentOrigin::CENTER );
mBlurRootActor.SetInheritOrientation(false);
mBlurRootActor.SetInheritScale(false);
mBlurRootActor.SetColorMode(USE_OWN_COLOR);
mLayout = Toolkit::TableView::New( 1, 1 );
mLayout.SetName( "TOOLBAR_LAYOUT" );
mLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- mLayout.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ mLayout.SetParentOrigin( ParentOrigin::CENTER );
Self().Add( mLayout );
{
// Create a focus indicator actor shared by all the keyboard focusable actors
Toolkit::ImageView focusIndicator = Toolkit::ImageView::New(FOCUS_BORDER_IMAGE_PATH);
- focusIndicator.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
+ focusIndicator.SetParentOrigin( ParentOrigin::CENTER );
// Apply size constraint to the focus indicator
focusIndicator.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Create a root actor and an image actor for offscreen rendering.
mOffscreenRootActor = Layer::New();
mOffscreenRootActor.SetColorMode( USE_OWN_COLOR );
- mOffscreenRootActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
+ mOffscreenRootActor.SetInheritPosition( false );
mOffscreenRootActor.SetInheritScale( false );
mOffscreenRootActor.SetDepthTestDisabled( true );
mOffscreenRootActor.SetSize( offscreenSize );
mActiveLayer.SetParentOrigin( ParentOrigin::CENTER );
mActiveLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- mActiveLayer.SetPositionInheritanceMode( USE_PARENT_POSITION );
// Add the active layer telling the controller it doesn't need clipping.
mController.AddDecoration( mActiveLayer, false );