currentStates.totalFrame = -1;
currentStates.scale = scale;
currentStates.redrawInScalingDown = true;
+ currentStates.desiredWidth = 0;
+ currentStates.desiredHeight = 0;
// Set changed flag as true when initalized state.
// After some properties change, LottieAnimationView.UpdateImage will apply these inital values.
.Add(ImageVisualProperty.StopBehavior, stopAction)
.Add(ImageVisualProperty.LoopingMode, loopMode)
.Add(ImageVisualProperty.RedrawInScalingDown, redrawInScalingDown);
+
+ if (currentStates.desiredWidth > 0)
+ {
+ using PropertyValue desiredWidth = new PropertyValue((int)currentStates.desiredWidth);
+ map.Add(ImageVisualProperty.DesiredWidth, desiredWidth);
+ }
+ if (currentStates.desiredHeight > 0)
+ {
+ using PropertyValue desiredHeight = new PropertyValue((int)currentStates.desiredHeight);
+ map.Add(ImageVisualProperty.DesiredHeight, desiredHeight);
+ }
+
Image = map;
// All states applied well.
}
/// <summary>
+ /// Gets or sets the desired image width for LottieAnimationView<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public new int DesiredWidth
+ {
+ get
+ {
+ return currentStates.desiredWidth;
+ }
+ set
+ {
+ currentStates.desiredWidth = value;
+ base.DesiredWidth = currentStates.desiredWidth;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the desired image height for LottieAnimationView<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public new int DesiredHeight
+ {
+ get
+ {
+ return currentStates.desiredHeight;
+ }
+ set
+ {
+ currentStates.desiredHeight = value;
+ base.DesiredHeight = currentStates.desiredHeight;
+ }
+ }
+
+ /// <summary>
/// Gets the playing state
/// </summary>
/// <since_tizen> 7 </since_tizen>
internal List<Tuple<string, int, int>> contentInfo;
internal string mark1, mark2;
internal bool redrawInScalingDown;
+ internal int desiredWidth, desiredHeight;
internal bool changed;
};
private states currentStates;