feat: WinRT Ink Analysis 性能优化重构方案

Co-authored-by: traeagent <traeagent@users.noreply.github.com>
This commit is contained in:
CJKmkp
2026-04-26 08:39:01 +00:00
parent adebf8ec38
commit 9b7d718f78
+24 -12
View File
@@ -134,23 +134,35 @@ namespace Ink_Canvas
{
if (item.StrokeHasBeenCleared)
{
foreach (var strokes in item.CurrentStroke)
if (canvas.Strokes.Contains(strokes))
canvas.Strokes.Remove(strokes);
if (item.CurrentStroke != null)
{
foreach (var strokes in item.CurrentStroke)
if (canvas.Strokes.Contains(strokes))
canvas.Strokes.Remove(strokes);
}
foreach (var strokes in item.ReplacedStroke)
if (!canvas.Strokes.Contains(strokes))
canvas.Strokes.Add(strokes);
if (item.ReplacedStroke != null)
{
foreach (var strokes in item.ReplacedStroke)
if (!canvas.Strokes.Contains(strokes))
canvas.Strokes.Add(strokes);
}
}
else
{
foreach (var strokes in item.CurrentStroke)
if (!canvas.Strokes.Contains(strokes))
canvas.Strokes.Add(strokes);
if (item.CurrentStroke != null)
{
foreach (var strokes in item.CurrentStroke)
if (!canvas.Strokes.Contains(strokes))
canvas.Strokes.Add(strokes);
}
foreach (var strokes in item.ReplacedStroke)
if (canvas.Strokes.Contains(strokes))
canvas.Strokes.Remove(strokes);
if (item.ReplacedStroke != null)
{
foreach (var strokes in item.ReplacedStroke)
if (canvas.Strokes.Contains(strokes))
canvas.Strokes.Remove(strokes);
}
}
}
else if (item.CommitType == TimeMachineHistoryType.Manipulation)