X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali%2Finternal%2Fevent%2Factors%2Factor-impl.cpp;h=44a9e89fc2be9f16aa001c9bdc1f8ca863da26db;hb=a35c7397dbd7de17a10e5cf1309631cb4c2a0ba4;hp=50c744e2da1e5677fceff157ee57a39ee1ee481e;hpb=700e2070be55ed470768d7e40cdf3549dc94e61e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp old mode 100755 new mode 100644 index 50c744e..44a9e89 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -214,7 +214,6 @@ DALI_PROPERTY( "opacity", FLOAT, true, true, true, Dali: DALI_PROPERTY( "screenPosition", VECTOR2, false, false, false, Dali::DevelActor::Property::SCREEN_POSITION ) DALI_PROPERTY( "positionUsesAnchorPoint", BOOLEAN, true, false, false, Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT ) DALI_PROPERTY( "culled", BOOLEAN, false, false, true, Dali::DevelActor::Property::CULLED ) -DALI_PROPERTY( "updateSizeHint", VECTOR2, true, true, true, Dali::DevelActor::Property::UPDATE_SIZE_HINT ) DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties ) // Signals @@ -1783,7 +1782,7 @@ ActorGestureData& Actor::GetGestureData() return *mGestureData; } -bool Actor::IsGestureRequred( Gesture::Type type ) const +bool Actor::IsGestureRequred( DevelGesture::Type type ) const { return mGestureData && mGestureData->IsGestureRequred( type ); } @@ -2719,12 +2718,6 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr break; } - case Dali::DevelActor::Property::UPDATE_SIZE_HINT: - { - SetUpdateSizeHint( property.Get< Vector2 >() ); - break; - } - default: { // this can happen in the case of a non-animatable default property so just do nothing @@ -3479,6 +3472,15 @@ bool Actor::DoAction( BaseObject* object, const std::string& actionName, const P return done; } +Rect<> Actor::CalculateScreenExtents( ) const +{ + auto screenPosition = GetCurrentScreenPosition(); + Vector3 size = GetCurrentSize() * GetCurrentWorldScale(); + Vector3 anchorPointOffSet = size * ( mPositionUsesAnchorPoint ? GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT ); + Vector2 position = Vector2( screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y ); + return { position.x, position.y, size.x, size.y }; +} + bool Actor::GetCachedPropertyValue( Property::Index index, Property::Value& value ) const { bool valueSet = true; @@ -3974,12 +3976,6 @@ bool Actor::GetCurrentPropertyValue( Property::Index index, Property::Value& val break; } - case Dali::DevelActor::Property::UPDATE_SIZE_HINT: - { - value = GetUpdateSizeHint(); - break; - } - default: { // Must be an event-side only property @@ -4729,19 +4725,6 @@ float Actor::GetMaximumSize( Dimension::Type dimension ) const return FLT_MAX; // Default } -void Actor::SetUpdateSizeHint( const Vector2& updateSizeHint ) -{ - // node is being used in a separate thread; queue a message to set the value & base value - SceneGraph::NodeTransformPropertyMessage::Send( GetEventThreadServices(), &GetNode(), &GetNode().mUpdateSizeHint, &SceneGraph::TransformManagerPropertyHandler::Bake, Vector3(updateSizeHint.width, updateSizeHint.height, 0.f ) ); -} - -const Vector2 Actor::GetUpdateSizeHint() const -{ - // node is being used in a separate thread; copy the value from the previous update - Vector3 updateSizeHint = GetNode().GetUpdateSizeHint( GetEventThreadServices().GetEventBufferIndex() ); - return Vector2( updateSizeHint.width, updateSizeHint.height ); -} - Object* Actor::GetParentObject() const { return mParent;