/// <param name="scale">The factor of scaling image, default : 1.0f</param>
/// <param name="shown">false : not displayed (hidden), true : displayed (shown), default : true</param>
/// <remarks>
- /// If shown parameter is false, it is not visible even the LottieAnimationView instance is created.
+ /// If the shown parameter is false, the animation is not visible even if the LottieAnimationView instance is created.
/// </remarks>
/// <example>
/// <code>
}
/// <summary>
- /// Get playing state
+ /// Gets the playing state
/// </summary>
/// <since_tizen> 7 </since_tizen>
public PlayStateType PlayState
}
/// <summary>
- /// Get the number of total frame
+ /// Get the number of total frames
/// </summary>
/// <since_tizen> 7 </since_tizen>
public int TotalFrame
}
/// <summary>
- /// Set or Get current frame. When setting a specific frame, it is displayed as a still image.
+ /// Set or get the current frame. When setting a specific frame, it is displayed as a still image.
/// </summary>
/// <remarks>
- /// Giving user set value when getting. If the out ranged frame is set, it is reset as minimum frame or maximum frame.
+ /// Gets the value set by a user. If the setting value is out-ranged, it is reset as a minimum frame or a maximum frame.
/// </remarks>
/// <example>
- /// Let's say myLottie.json file has 100 frames originally, then it will have 0 ~ 99 range of frame index.
+ /// We assume that the animation in myLottie.json file has 100 frames originally. If so, its frame index will be 0 - 99.
/// <code>
/// LottieAnimationView myLottie = new LottieAnimationView();
/// myLottie.URL = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "myLottie.json"; //myLottie.json's total frame is 100 (frame: 0~99)
{
currentStates.frame = value;
tlog.Fatal(tag, $"<[{GetId()}]SET frame={currentStates.frame}>");
- DoAction(vectorImageVisualIndex, (int)actionType.jumpTo, new PropertyValue(currentStates.frame));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.jumpTo, new PropertyValue(currentStates.frame));
}
get
{
}
/// <summary>
- /// Set or Get looping mode of Lottie animation.
+ /// Sets or gets the looping mode of Lottie animation.
/// </summary>
/// <since_tizen> 7 </since_tizen>
public LoopingModeType LoopingMode
tlog.Fatal(tag, $"<[{GetId()}] SET loopMode={currentStates.loopMode}>");
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
- DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.updateProperty, new PropertyValue(map));
}
get
{
}
/// <summary>
- /// Set or Get loop count.
+ /// Sets or gets the loop count.
/// </summary>
/// <remarks>
- /// Minus value means infinite loop count.
+ /// The minus value means the infinite loop count.
/// </remarks>
/// <example>
/// <code>
tlog.Fatal(tag, $"<[{GetId()}]SET currentStates.loopCount={currentStates.loopCount}>");
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.LoopCount, new PropertyValue(currentStates.loopCount));
- DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.updateProperty, new PropertyValue(map));
}
get
{
}
/// <summary>
- /// Set or Get stop behavior.
+ /// Sets or gets the stop behavior.
/// </summary>
/// <since_tizen> 7 </since_tizen>
public StopBehaviorType StopBehavior
tlog.Fatal(tag, $"<[{GetId()}]SET val={currentStates.stopEndAction}>");
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction));
- DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.updateProperty, new PropertyValue(map));
}
get
{
#region Method
/// <summary>
- /// Set minimum and maximum frame.
+ /// Set the minimum and the maximum frame.
/// </summary>
/// <param name="minFrame">minimum frame</param>
/// <param name="maxFrame">maximum frame</param>
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.PlayRange, new PropertyValue(array));
- DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.updateProperty, new PropertyValue(map));
tlog.Fatal(tag, $" [{GetId()}] currentStates.min:({currentStates.framePlayRangeMin}, max:{currentStates.framePlayRangeMax})>");
}
}
/// <summary>
- /// Get the list of layers' information (start frame, end frame) in Lottie file.
+ /// Get the list of layers' information such as the start frame and the end frame in the Lottie file.
/// </summary>
/// <returns>List of Tuple (string of layer name, integer of start frame, integer of end frame)</returns>
/// <since_tizen> 7 </since_tizen>
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.PlayRange, new PropertyValue(array));
- DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+ DoAction(ImageView.Property.IMAGE, (int)actionType.updateProperty, new PropertyValue(map));
tlog.Fatal(tag, $" [{GetId()}] currentStates.mark1:{currentStates.mark1}, mark2:{currentStates.mark2} >");
}
}
private const string tag = "NUITEST";
- private const int vectorImageVisualIndex = 10000000 + 1000 + 2;
private event EventHandler finishedEventHandler;
private void OnFinished()
return new LottieFrameInfo(stillImageFrame, stillImageFrame);
}
- internal bool IsStillImage()
+ /// <summary>
+ /// Inhouse API.
+ /// Whether this LottieFrameInfo represents one frame or more.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsStillImage()
{
return StartFrame == EndFrame;
}
- internal void Show(LottieAnimationView lottieView, bool noPlay = false)
+ /// <summary>
+ /// Inhouse API.
+ /// Play specified LottieAnimationView with this frame information.
+ /// </summary>
+ /// <param name="lottieView">The target LottieAnimationView to play.</param>
+ /// <param name="noPlay">Whether go direct to the EndFrame. It is false by default.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Show(LottieAnimationView lottieView, bool noPlay = false)
{
if (!BeReadyToShow(lottieView))
{
}
lottieView.SetMinMaxFrame(StartFrame, Math.Min(EndFrame, lottieView.TotalFrame - 1));
- lottieView.CurrentFrame = StartFrame;
- if (!noPlay && !IsStillImage())
+ if (IsStillImage() || noPlay)
+ {
+ lottieView.CurrentFrame = EndFrame;
+ }
+ else
{
+ lottieView.CurrentFrame = StartFrame;
lottieView.Play();
}
}