// INTERNAL INCLUDES
#include <dali/internal/event/animation/animation-playlist.h>
#include <dali/internal/event/animation/animator-connector.h>
+#include <dali/internal/event/animation/key-frames-impl.h>
#include <dali/internal/event/animation/path-impl.h>
#include <dali/internal/event/common/notification-manager.h>
#include <dali/internal/event/common/property-helper.h>
AppendConnectorTargetValues({std::move(destinationValue), period, connectorIndex, Animation::TO});
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames)
{
AnimateBetween(target, keyFrames, mDefaultAlpha, TimePeriod(mDurationSeconds), DEFAULT_INTERPOLATION);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, Interpolation interpolation)
{
AnimateBetween(target, keyFrames, mDefaultAlpha, TimePeriod(mDurationSeconds), interpolation);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period)
{
AnimateBetween(target, keyFrames, mDefaultAlpha, period, DEFAULT_INTERPOLATION);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period, Interpolation interpolation)
{
AnimateBetween(target, keyFrames, mDefaultAlpha, period, interpolation);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha)
{
AnimateBetween(target, keyFrames, alpha, TimePeriod(mDurationSeconds), DEFAULT_INTERPOLATION);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, Interpolation interpolation)
{
AnimateBetween(target, keyFrames, alpha, TimePeriod(mDurationSeconds), interpolation);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
{
AnimateBetween(target, keyFrames, alpha, period, DEFAULT_INTERPOLATION);
}
-void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation)
{
- Object& object = GetImplementation(target.object);
+ Object& object = GetImplementation(target.object);
+ const KeyFrames& keyFramesImpl = GetImplementation(keyFrames);
+
const Property::Type propertyType = object.GetPropertyType(target.propertyIndex);
- const Property::Type destinationType = keyFrames.GetType();
+ const Property::Type destinationType = keyFramesImpl.GetType();
// validate animation parameters, if component index is set then use float as checked type
ValidateParameters((target.componentIndex == Property::INVALID_COMPONENT_INDEX) ? propertyType : Property::FLOAT,
ExtendDuration(period);
- AppendConnectorTargetValues({keyFrames.GetLastKeyFrameValue(), period, mConnectors.Count(), BETWEEN});
+ AppendConnectorTargetValues({keyFramesImpl.GetLastKeyFrameValue(), period, mConnectors.Count(), BETWEEN});
// using destination type so component animation gets correct type
switch(destinationType)
{
case Dali::Property::BOOLEAN:
{
- auto kf = GetSpecialization<const KeyFrameBoolean*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameBoolean*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<bool>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::INTEGER:
{
- auto kf = GetSpecialization<const KeyFrameInteger*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameInteger*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<int32_t>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::FLOAT:
{
- auto kf = GetSpecialization<const KeyFrameNumber*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameNumber*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<float>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::VECTOR2:
{
- auto kf = GetSpecialization<const KeyFrameVector2*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameVector2*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<Vector2>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::VECTOR3:
{
- auto kf = GetSpecialization<const KeyFrameVector3*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameVector3*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<Vector3>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::VECTOR4:
{
- auto kf = GetSpecialization<const KeyFrameVector4*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameVector4*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<Vector4>::New(object,
target.propertyIndex,
target.componentIndex,
case Dali::Property::ROTATION:
{
- auto kf = GetSpecialization<const KeyFrameQuaternion*>(keyFrames);
+ auto kf = GetSpecialization<const KeyFrameQuaternion*>(keyFramesImpl);
AddAnimatorConnector(AnimatorConnector<Quaternion>::New(object,
target.propertyIndex,
target.componentIndex,
// INTERNAL INCLUDES
#include <dali/devel-api/animation/animation-devel.h>
#include <dali/devel-api/common/owner-container.h>
-#include <dali/internal/event/animation/key-frames-impl.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/public-api/animation/animation.h>
+#include <dali/public-api/animation/key-frames.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/ref-object.h>
void AnimateTo(Property& target, Property::Value destinationValue, AlphaFunction alpha, TimePeriod period);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, Interpolation interpolation)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, Interpolation interpolation);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, Interpolation interpolation);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period, Interpolation interpolation)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, TimePeriod period, Interpolation interpolation);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, Interpolation interpolation)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, Interpolation interpolation);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period)
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period);
/**
- * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation )
+ * @copydoc Dali::Animation::AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation )
*/
- void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
+ void AnimateBetween(Property target, Dali::KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
// Actor-specific convenience functions
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
GetImplementation(*this).AnimateTo(target, std::move(destinationValue), alpha, period);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames));
+ GetImplementation(*this).AnimateBetween(target, keyFrames);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, Interpolation interpolation)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), interpolation);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, interpolation);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), period);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, period);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Interpolation interpolation)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), period, interpolation);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, period, interpolation);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), alpha);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, alpha);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Interpolation interpolation)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), alpha, interpolation);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, alpha, interpolation);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), alpha, period);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, alpha, period);
}
-void Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation)
+void Animation::AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation)
{
- GetImplementation(*this).AnimateBetween(target, GetImplementation(keyFrames), alpha, period, interpolation);
+ GetImplementation(*this).AnimateBetween(target, keyFrames, alpha, period, interpolation);
}
// Actor specific animations
#define DALI_ANIMATION_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
public:
using AnimationSignalType = Signal<void(Animation&)>; ///< Animation finished signal type @SINCE_1_0.0
- using AnyFunction = Any; ///< Interpolation function @SINCE_1_0.0
+ using AnyFunction = Any; ///< Interpolation function @SINCE_1_0.0
/**
* @brief Enumeration for what to do when the animation ends, is stopped, or is destroyed.
* @param[in] target The target object property to animate
* @param[in] keyFrames The set of time/value pairs between which to animate
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames);
+ void AnimateBetween(Property target, KeyFrames keyFrames);
/**
* @brief Animates a property between keyframes.
* @param[in] keyFrames The set of time/value pairs between which to animate
* @param[in] interpolation The method used to interpolate between values
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation);
+ void AnimateBetween(Property target, KeyFrames keyFrames, Interpolation interpolation);
/**
* @brief Animates a property between keyframes.
* @param[in] keyFrames The set of time/value pairs between which to animate
* @param[in] alpha The alpha function to apply
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha);
+ void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha);
/**
* @brief Animates a property between keyframes.
* @param[in] alpha The alpha function to apply
* @param[in] interpolation The method used to interpolate between values
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation);
+ void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Interpolation interpolation);
/**
* @brief Animates a property between keyframes.
* @param[in] keyFrames The set of time/value pairs between which to animate
* @param[in] period The effect will occur during this time period
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period);
+ void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period);
/**
* @brief Animates a property between keyframes.
* @param[in] period The effect will occur during this time period
* @param[in] interpolation The method used to interpolate between values
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation);
+ void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Interpolation interpolation);
/**
* @brief Animates a property between keyframes.
* @param[in] alpha The alpha function to apply
* @param[in] period The effect will occur during this time period
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period);
+ void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period);
/**
* @brief Animates a property between keyframes.
* @param[in] period The effect will occur during this time period
* @param[in] interpolation The method used to interpolate between values
*/
- void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
+ void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
// Actor-specific convenience methods