feat: WinRT Ink Analysis 性能优化重构方案
Co-authored-by: traeagent <traeagent@users.noreply.github.com>
This commit is contained in:
@@ -133,26 +133,38 @@ namespace Ink_Canvas
|
|||||||
else if (item.CommitType == TimeMachineHistoryType.ShapeRecognition)
|
else if (item.CommitType == TimeMachineHistoryType.ShapeRecognition)
|
||||||
{
|
{
|
||||||
if (item.StrokeHasBeenCleared)
|
if (item.StrokeHasBeenCleared)
|
||||||
|
{
|
||||||
|
if (item.CurrentStroke != null)
|
||||||
{
|
{
|
||||||
foreach (var strokes in item.CurrentStroke)
|
foreach (var strokes in item.CurrentStroke)
|
||||||
if (canvas.Strokes.Contains(strokes))
|
if (canvas.Strokes.Contains(strokes))
|
||||||
canvas.Strokes.Remove(strokes);
|
canvas.Strokes.Remove(strokes);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.ReplacedStroke != null)
|
||||||
|
{
|
||||||
foreach (var strokes in item.ReplacedStroke)
|
foreach (var strokes in item.ReplacedStroke)
|
||||||
if (!canvas.Strokes.Contains(strokes))
|
if (!canvas.Strokes.Contains(strokes))
|
||||||
canvas.Strokes.Add(strokes);
|
canvas.Strokes.Add(strokes);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (item.CurrentStroke != null)
|
||||||
{
|
{
|
||||||
foreach (var strokes in item.CurrentStroke)
|
foreach (var strokes in item.CurrentStroke)
|
||||||
if (!canvas.Strokes.Contains(strokes))
|
if (!canvas.Strokes.Contains(strokes))
|
||||||
canvas.Strokes.Add(strokes);
|
canvas.Strokes.Add(strokes);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.ReplacedStroke != null)
|
||||||
|
{
|
||||||
foreach (var strokes in item.ReplacedStroke)
|
foreach (var strokes in item.ReplacedStroke)
|
||||||
if (canvas.Strokes.Contains(strokes))
|
if (canvas.Strokes.Contains(strokes))
|
||||||
canvas.Strokes.Remove(strokes);
|
canvas.Strokes.Remove(strokes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (item.CommitType == TimeMachineHistoryType.Manipulation)
|
else if (item.CommitType == TimeMachineHistoryType.Manipulation)
|
||||||
{
|
{
|
||||||
if (!item.StrokeHasBeenCleared)
|
if (!item.StrokeHasBeenCleared)
|
||||||
|
|||||||
Reference in New Issue
Block a user