[EditorBrowsable(EditorBrowsableState.Never)]
public AnimatedVectorImageView(float scale = 1.0f, bool shown = true) : base()
{
- tlog.Fatal(tag, $" <<< AnimatedVectorImageView() constructor GetId={GetId()} >>>");
+ tlog.Fatal(tag, $"< constructor GetId={GetId()} >");
currentStates.url = "";
currentStates.frame = -1;
- currentStates.loopCount = 0;
+ currentStates.loopCount = 1;
currentStates.loopMode = LoopingModeType.Restart;
currentStates.stopEndAction = StopBehaviorType.CurrentFrame;
currentStates.framePlayRangeMin = -1;
return;
}
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Dispose(type={type})!");
+ tlog.Fatal(tag, $"<[{GetId()}] type={type}");
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
}
base.Dispose(type);
- tlog.Fatal(tag, $" [{GetId()}]AnimatedVectorImageView.Dispose(type={type}) >>>");
+ tlog.Fatal(tag, $"[{GetId()}]>");
}
#endregion Constructor, Distructor, Dispose
currentStates.url = ret;
currentStates.changed = true;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.URL SET url={currentStates.url} >>>");
+ tlog.Fatal(tag, $"<[{GetId()}]SET url={currentStates.url}");
PropertyMap map = new PropertyMap();
map.Add(Visual.Property.Type, new PropertyValue((int)DevelVisual.Type.AnimatedVectorImage))
.Add(ImageVisualProperty.StopBehavior, new PropertyValue((int)currentStates.stopEndAction))
.Add(ImageVisualProperty.LoopingMode, new PropertyValue((int)currentStates.loopMode));
Image = map;
+ tlog.Fatal(tag, $"<[{GetId()}]>");
}
get
{
string ret = currentStates.url;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.URL GET");
+ tlog.Fatal(tag, $"<[{GetId()}] GET");
PropertyMap map = Image;
if (map != null)
{
if (val.Get(out ret))
{
- tlog.Fatal(tag, $" gotten url={ret} >>>");
+ tlog.Fatal(tag, $"gotten url={ret} >");
return ret;
}
}
}
- tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get URL from dali >>>");
+ tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get URL from dali >");
return ret;
}
}
{
get
{
- var ret = -1;
- PropertyMap map = Image;
+ tlog.Fatal(tag, $"< Get!");
+ PropertyMap map = base.Image;
+ var ret = 0;
if (map != null)
{
- PropertyValue val = map.Find((int)DevelVisual.Type.AnimatedVectorImage);
+ PropertyValue val = map.Find(ImageVisualProperty.PlayState);
if (val != null)
{
if (val.Get(out ret))
{
- return (PlayStateType)ret;
+ currentStates.playState = (PlayStateType)ret;
+ tlog.Fatal(tag, $"gotten play state={ret} >");
+ return currentStates.playState;
}
}
}
- tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get PlayState from dali");
- return (PlayStateType)ret;
+ tlog.Error(tag, $"<[ERROR][{GetId()}]Fail to get PlayState from dali currentStates.playState={currentStates.playState}>");
+ return currentStates.playState;
}
}
}
}
}
- tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get TotalFrameNumber from dali");
+ tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get TotalFrameNumber from dali>");
return ret;
}
}
set
{
currentStates.frame = value;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.CurrentFrameNumber SET frame={currentStates.frame} >>>");
+ tlog.Fatal(tag, $"<[{GetId()}]SET frame={currentStates.frame}>");
DoAction(vectorImageVisualIndex, (int)actionType.jumpTo, new PropertyValue(currentStates.frame));
}
get
}
}
}
- tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get CurrentFrameNumber from dali!! ret={ret}");
+ tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get CurrentFrameNumber from dali!! ret={ret}>");
return ret;
}
}
currentStates.loopMode = (LoopingModeType)value;
currentStates.changed = true;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.LoopMode SET loopMode={currentStates.loopMode} >>>");
+ 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));
}
}
}
- tlog.Error(tag, $" [ERROR][{GetId()}](AnimatedVectorImageView) Fail to get loopMode from dali");
+ tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get loopMode from dali>");
return currentStates.loopMode;
}
}
{
currentStates.changed = true;
currentStates.loopCount = value;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.LoopCount SET currentStates.loopCount={currentStates.loopCount} >>>");
+ 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));
//tlog.Fatal(tag, $"gotten loop count={ret}");
if (ret != currentStates.loopCount && ret > 0)
{
- tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different loop count! gotten={ret}, loopCount={currentStates.loopCount}");
+ tlog.Fatal(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) different loop count! gotten={ret}, loopCount={currentStates.loopCount}>");
}
currentStates.loopCount = ret;
return currentStates.loopCount;
}
}
}
- tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get LoopCount from dali currentStates.loopCount={currentStates.loopCount}");
+ tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get LoopCount from dali currentStates.loopCount={currentStates.loopCount}>");
return currentStates.loopCount;
}
}
currentStates.stopEndAction = (StopBehaviorType)value;
currentStates.changed = true;
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.StopBehavior SET val={currentStates.stopEndAction} >>>");
+ 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));
//tlog.Fatal(tag, $"gotten StopBehavior={ret}");
if (ret != (int)currentStates.stopEndAction)
{
- tlog.Fatal(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) different StopBehavior! gotten={ret}, StopBehavior={currentStates.stopEndAction}");
+ tlog.Fatal(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) different StopBehavior! gotten={ret}, StopBehavior={currentStates.stopEndAction}>");
}
currentStates.stopEndAction = (StopBehaviorType)ret;
return (StopBehaviorType)ret;
}
}
}
- tlog.Error(tag, $"[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get StopBehavior from dali");
+ tlog.Error(tag, $"<[ERROR][{GetId()}](AnimatedVectorImageView) Fail to get StopBehavior from dali>");
return currentStates.stopEndAction;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetPlayRange(int startFrame, int endFrame)
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.SetPlayRange({startFrame}, {endFrame})");
+ tlog.Fatal(tag, $"< [{GetId()}] SetPlayRange({startFrame}, {endFrame})");
currentStates.changed = true;
currentStates.framePlayRangeMin = startFrame;
PropertyMap map = new PropertyMap();
map.Add(ImageVisualProperty.PlayRange, new PropertyValue(array));
DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
- tlog.Fatal(tag, $" [{GetId()}](AnimatedVectorImageView) currentStates=({currentStates.framePlayRangeMin}, {currentStates.framePlayRangeMax}) >>>");
+ tlog.Fatal(tag, $" [{GetId()}] currentStates.min:({currentStates.framePlayRangeMin}, max:{currentStates.framePlayRangeMax})>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Play()
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Play() called >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] Play()");
debugPrint();
base.Play();
+ tlog.Fatal(tag, $"[{GetId()}]>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Pause()
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Pause() called >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] Pause()>");
debugPrint();
base.Pause();
+ tlog.Fatal(tag, $"[{GetId()}]>");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Stop()
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Stop() called >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] Stop()");
debugPrint();
base.Stop();
+ tlog.Fatal(tag, $"[{GetId()}]>");
}
#endregion Method
{
if (finishedEventHandler == null)
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler added >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] Finished eventhandler added>");
visualEventSignalCallback = onVisualEventSignal;
VisualEventSignal().Connect(visualEventSignalCallback);
}
}
remove
{
- tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Finished eventhandler removed >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] Finished eventhandler removed>");
finishedEventHandler -= value;
if (finishedEventHandler == null && visualEventSignalCallback != null)
{
internal bool changed;
internal int totalFrame;
internal float scale;
+ internal PlayStateType playState;
};
private states currentStates;
private void OnFinished()
{
- tlog.Fatal(tag, $" <<<[{GetId()}] OnFinished() called >>>");
+ tlog.Fatal(tag, $"<[{GetId()}] OnFinished()>");
finishedEventHandler?.Invoke(this, null);
}
e.SignalId = signalId;
visualEventSignalHandler?.Invoke(this, e);
- tlog.Fatal(tag, $" [{GetId()}] onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}");
+ tlog.Fatal(tag, $"<[{GetId()}] onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}>");
}
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private void debugPrint()
{
- tlog.Fatal(tag, $" <<< [{GetId()}] get currentStates : url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin/Max({currentStates.framePlayRangeMin},{currentStates.framePlayRangeMax}) ");
- tlog.Fatal(tag, $" get from Property : StopBehavior={StopBehavior}, LoopMode={LoopMode}, LoopCount={LoopCount} >>>");
+ tlog.Fatal(tag, $"===================================");
+ tlog.Fatal(tag, $"<[{GetId()}] get currentStates : url={currentStates.url}, loopCount={currentStates.loopCount}, framePlayRangeMin/Max({currentStates.framePlayRangeMin},{currentStates.framePlayRangeMax}) ");
+ tlog.Fatal(tag, $" get from Property : StopBehavior={StopBehavior}, LoopMode={LoopMode}, LoopCount={LoopCount}, PlayState={PlayState} >");
+ tlog.Fatal(tag, $"===================================");
}
#endregion Private
}
-}
+}
\ No newline at end of file
[EditorBrowsable(EditorBrowsableState.Never)]
public VectorAnimationViewTBD() : base()
{
- tlog.Fatal(tag, $"<<< VectorAnimationView() constuctor objId={GetId()} >>>");
+ tlog.Fatal(tag, $"[VAV START[ constuctor objId={GetId()} ]VAV END]");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public VectorAnimationViewTBD(float scale) : base(scale)
{
- tlog.Fatal(tag, $"<<< VectorAnimationView(scale={scale}) constuctor objId={GetId()}>>>");
+ tlog.Fatal(tag, $"[VAV START[ constuctor scale={scale}) objId={GetId()} ]VAV END]");
}
/// <summary>
{
return;
}
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Dispose(type={type})");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] type={type})");
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
base.Dispose(type);
- tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.Dispose() >>>");
+ tlog.Fatal(tag, $"]VAV END]");
}
#endregion Constructor, Distructor, Dispose
{
set
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.ResourceURL SET");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] ResourceURL SET");
if (value == mResourceURL)
{
mResourceURL = (value == null) ? "" : value;
URL = mResourceURL;
mIsMinMaxSet = false;
-
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.ResourceURL SET mResourceURL={mResourceURL}) >>>");
+ mTotalFrameNum = TotalFrameNumber;
+ tlog.Fatal(tag, $" [{GetId()}] mResourceURL={mResourceURL}) ]VAV END]");
}
get => mResourceURL;
}
{
set
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatCount SET");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] RepeatCount SET");
mRepeatCount = (value < -1) ? -1 : value;
- //LoopCount = mRepeatCount;
LoopCount = (mRepeatCount < 0) ? mRepeatCount : mRepeatCount + 1;
- tlog.Fatal(tag, $"[{GetId()}] VectorAnimationView.RepeatCount SET mRepeatCount={mRepeatCount} >>>");
+ tlog.Fatal(tag, $"[{GetId()}] mRepeatCount={mRepeatCount} ]VAV END]");
}
get => mRepeatCount;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public int TotalFrame
{
- get => TotalFrameNumber;
+ get => mTotalFrameNum;
}
/// <summary>
{
set
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.CurrentFrame SET");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] CurrentFrame SET");
if (mResourceURL == null || mResourceURL == String.Empty)
{
throw new InvalidOperationException("Resource Url not yet Set");
}
- mFrameCount = TotalFrameNumber;
-
if (value < 0)
{
value = 0;
}
- else if (value >= mFrameCount)
+ else if (value >= mTotalFrameNum)
{
- value = mFrameCount - 1;
+ value = mTotalFrameNum - 1;
}
mCurrentFrame = value;
AnimationState = AnimationStates.Paused;
- SetPlayRange(mCurrentFrame, mCurrentFrame);
+ SetPlayRange(0, mTotalFrameNum - 1);
CurrentFrameNumber = mCurrentFrame;
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.CurrentFrame SET mCurrentFrame={mCurrentFrame}) >>>");
+ tlog.Fatal(tag, $" [{GetId()}] mCurrentFrame={mCurrentFrame}) ]VAV END]");
}
get => mCurrentFrame;
}
{
set
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.RepeatMode SET");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] RepeatMode SET");
mRepeatMode = value;
switch (mRepeatMode)
break;
}
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.RepeatMode SET mRepeatMode={mRepeatMode}) >>>");
+ tlog.Fatal(tag, $" [{GetId()}] mRepeatMode={mRepeatMode}) ]VAV END]");
}
get => mRepeatMode;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetMinAndMaxFrame(int minFrame, int maxFrame)
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.SetMinAndMaxFrame({minFrame}, {maxFrame})");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] SetMinAndMaxFrame({minFrame}, {maxFrame})");
mMinFrame = (minFrame) > 0 ? minFrame : 0;
mMaxFrame = (maxFrame) > 0 ? maxFrame : 0;
mIsMinMaxSet = true;
- mFrameCount = TotalFrameNumber;
- if (mMinFrame >= mFrameCount)
+ if (mMinFrame >= mTotalFrameNum)
{
- mMinFrame = mFrameCount - 1;
+ mMinFrame = mTotalFrameNum - 1;
}
- if (mMaxFrame >= mFrameCount)
+ if (mMaxFrame >= mTotalFrameNum)
{
- mMaxFrame = mFrameCount - 1;
+ mMaxFrame = mTotalFrameNum - 1;
}
if (mMinFrame > mMaxFrame)
return;
}
- base.Stop();
+ //base.Stop();
SetPlayRange(mMinFrame, mMaxFrame);
- CurrentFrameNumber = mMinFrame;
+ //CurrentFrameNumber = mMinFrame;
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.SetMinAndMaxFrame(m: {mMinFrame}, {mMaxFrame}) >>>");
+ tlog.Fatal(tag, $" [{GetId()}] mMinFrame:{mMinFrame}, mMaxFrame:{mMaxFrame}) ]VAV END]");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Play()
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Play()");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
if (mResourceURL == null || mResourceURL == String.Empty)
{
if (mIsMinMaxSet)
{
- //if(mRepeatCount > 0 )
- //{
- // StopBehavior = StopBehaviorType.FirstFrame;
- //}
SetPlayRange(mMinFrame, mMaxFrame);
}
else
{
- SetPlayRange(0, TotalFrameNumber - 1);
+ SetPlayRange(0, mTotalFrameNum - 1);
+ CurrentFrame = 0;
}
//temporal fix
base.Play();
AnimationState = AnimationStates.Playing;
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Play(mIsMinMaxSet={mIsMinMaxSet}) >>>");
+ tlog.Fatal(tag, $" [{GetId()}] mIsMinMaxSet={mIsMinMaxSet}) ]VAV END]");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public new void Pause()
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Pause() AnimationState={AnimationState}");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] AnimationState={AnimationState}, PlayState={PlayState}");
if (mResourceURL == null || mResourceURL == String.Empty)
{
base.Pause();
AnimationState = AnimationStates.Paused;
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Pause() >>>");
+ tlog.Fatal(tag, $" [{GetId()}] ]VAV END]");
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void Stop(EndActions endAction = EndActions.Cancel)
{
- tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Stop({endAction})");
+ tlog.Fatal(tag, $"[VAV START[ [{GetId()}] endAction:({endAction}), PlayState={PlayState}");
if (mResourceURL == null || mResourceURL == String.Empty)
{
{
mEndAction = endAction;
switch (endAction)
- {
+ {
case EndActions.Cancel:
StopBehavior = StopBehaviorType.CurrentFrame;
break;
default:
tlog.Fatal(tag, $" [{GetId()}] no endAction : default set");
break;
+ }
}
- }
- //if (endAction == EndActions.Discard)
- //{
- // CurrentFrame = mMinFrame;
- //}
- //else if (endAction == EndActions.StopFinal)
- //{
- // CurrentFrame = mMaxFrame;
- //}
AnimationState = AnimationStates.Stopped;
base.Stop();
- tlog.Fatal(tag, $" [{GetId()}] VectorAnimationView.Stop(endaction={endAction}) >>>");
+ if (endAction == EndActions.StopFinal)
+ {
+ if (mIsMinMaxSet)
+ {
+ if (CurrentFrameNumber != mMaxFrame)
+ {
+ tlog.Fatal(tag, $"mIsMinMaxSet:{mIsMinMaxSet}, CurrentFrameNumber:{CurrentFrameNumber}, mMaxFrame:{ mMaxFrame}");
+ CurrentFrameNumber = mMaxFrame;
+ tlog.Fatal(tag, $"set CurrentFrameNumber({CurrentFrameNumber}) as mMaxFrame({mMaxFrame})!!!");
+ }
+ }
+ else
+ {
+ if (CurrentFrameNumber != mTotalFrameNum - 1)
+ {
+ tlog.Fatal(tag, $"mIsMinMaxSet:{mIsMinMaxSet}, CurrentFrameNumber:{CurrentFrameNumber}, mTotalFrameNum:{ mTotalFrameNum}");
+ CurrentFrameNumber = mTotalFrameNum - 1;
+ tlog.Fatal(tag, $"set CurrentFrameNumber({CurrentFrameNumber}) as mTotalFrameNum({mMaxFrame}) - 1 !");
+ }
+ }
+ }
+
+ tlog.Fatal(tag, $" [{GetId()}] ]VAV END]");
}
#endregion Method
#region Private
private string mResourceURL = null;
private int mRepeatCount = 0;
- private int mFrameCount = 0;
+ private int mTotalFrameNum = 0;
private RepeatModes mRepeatMode = RepeatModes.Restart;
private int mMinFrame = -1, mMaxFrame = -1;
private bool mIsMinMaxSet = false;
private string tag = "NUITEST";
#endregion Private
}
-}
+}
\ No newline at end of file