LOTInterpolatorCallback.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // LOTInterpolatorCallback.h
  3. // Lottie
  4. //
  5. // Created by brandon_withrow on 12/15/17.
  6. // Copyright © 2017 Airbnb. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <CoreGraphics/CoreGraphics.h>
  10. #import "LOTValueDelegate.h"
  11. /*!
  12. @brief LOTPointInterpolatorCallback is a container for a CGPointRef. This container is a LOTPointValueDelegate that will return the point interpolated at currentProgress between fromPoint and toPoint. Externally changing currentProgress will change the point of the animation.
  13. @discussion LOTPointInterpolatorCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeypoint to set a point value of an animation property.
  14. */
  15. @interface LOTPointInterpolatorCallback : NSObject <LOTPointValueDelegate>
  16. + (instancetype _Nonnull)withFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint NS_SWIFT_NAME(init(from:to:));
  17. @property (nonatomic) CGPoint fromPoint;
  18. @property (nonatomic) CGPoint toPoint;
  19. /*!
  20. @brief As currentProgress changes from 0 to 1 the point sent to the animation view is interpolated between fromPoint and toPoint.
  21. */
  22. @property (nonatomic, assign) CGFloat currentProgress;
  23. @end
  24. /*!
  25. @brief LOTSizeInterpolatorCallback is a container for a CGSizeRef. This container is a LOTSizeValueDelegate that will return the size interpolated at currentProgress between fromSize and toSize. Externally changing currentProgress will change the size of the animation.
  26. @discussion LOTSizeInterpolatorCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeysize to set a size value of an animation property.
  27. */
  28. @interface LOTSizeInterpolatorCallback : NSObject <LOTSizeValueDelegate>
  29. + (instancetype _Nonnull)withFromSize:(CGSize)fromSize toSize:(CGSize)toSize NS_SWIFT_NAME(init(from:to:));
  30. @property (nonatomic) CGSize fromSize;
  31. @property (nonatomic) CGSize toSize;
  32. /*!
  33. @brief As currentProgress changes from 0 to 1 the size sent to the animation view is interpolated between fromSize and toSize.
  34. */
  35. @property (nonatomic, assign) CGFloat currentProgress;
  36. @end
  37. /*!
  38. @brief LOTFloatInterpolatorCallback is a container for a CGFloatRef. This container is a LOTFloatValueDelegate that will return the float interpolated at currentProgress between fromFloat and toFloat. Externally changing currentProgress will change the float of the animation.
  39. @discussion LOTFloatInterpolatorCallback is used in conjunction with LOTAnimationView setValueDelegate:forKeyfloat to set a float value of an animation property.
  40. */
  41. @interface LOTFloatInterpolatorCallback : NSObject <LOTNumberValueDelegate>
  42. + (instancetype _Nonnull)withFromFloat:(CGFloat)fromFloat toFloat:(CGFloat)toFloat NS_SWIFT_NAME(init(from:to:));
  43. @property (nonatomic) CGFloat fromFloat;
  44. @property (nonatomic) CGFloat toFloat;
  45. /*!
  46. @brief As currentProgress changes from 0 to 1 the float sent to the animation view is interpolated between fromFloat and toFloat.
  47. */
  48. @property (nonatomic, assign) CGFloat currentProgress;
  49. @end