This commit is contained in:
2025-10-01 14:13:09 +08:00
parent 6f8e08c21a
commit 6d98d96ccb
3 changed files with 18 additions and 23 deletions
+14 -13
View File
@@ -491,25 +491,15 @@ namespace Ink_Canvas
if (drawingShapeMode != 0)
{
// 确保几何绘制模式下不切换到Ink模式,避免触摸轨迹被收集
inkCanvas.EditingMode = InkCanvasEditingMode.None;
if (!isTouchDown) return;
if (isWaitUntilNextTouchDown && dec.Count > 1) return;
if (dec.Count > 1)
// 对于多笔图形绘制,允许第二笔绘制,即使dec.Count > 1
if (dec.Count > 1 && !((drawingShapeMode == 24 || drawingShapeMode == 25) && drawMultiStepShapeCurrentStep == 1))
{
if ((drawingShapeMode == 24 || drawingShapeMode == 25) && drawMultiStepShapeCurrentStep == 1)
{
// 第二笔绘制双曲线时,只删除第二笔的临时笔画,保留第一笔的辅助线
try
{
inkCanvas.Strokes.Remove(lastTempStroke);
}
catch { }
return;
}
// 其他情况正常删除临时笔画
try
{
@@ -522,6 +512,17 @@ namespace Ink_Canvas
}
return;
}
// 第二笔绘制双曲线时,只删除第二笔的临时笔画,保留第一笔的辅助线
if ((drawingShapeMode == 24 || drawingShapeMode == 25) && drawMultiStepShapeCurrentStep == 1)
{
try
{
inkCanvas.Strokes.Remove(lastTempStroke);
}
catch { }
// 不直接返回,继续执行绘制逻辑
}
Point touchPoint = e.GetTouchPoint(inkCanvas).Position;
if ((drawingShapeMode == 24 || drawingShapeMode == 25) && drawMultiStepShapeCurrentStep == 1)