improve:墨迹平滑

This commit is contained in:
2025-07-26 19:03:07 +08:00
parent ecfe05139e
commit 04b2663183
10 changed files with 1085 additions and 34 deletions
+8 -9
View File
@@ -1579,17 +1579,16 @@ namespace Ink_Canvas {
{
try
{
var advancedSmoothing = new Helpers.AdvancedBezierSmoothing
{
};
// 对临时笔画应用平滑
if (lastTempStroke != null)
if (lastTempStroke != null && _inkSmoothingManager != null)
{
var smoothedStroke = advancedSmoothing.SmoothStroke(lastTempStroke);
inkCanvas.Strokes.Remove(lastTempStroke);
lastTempStroke = smoothedStroke;
inkCanvas.Strokes.Add(smoothedStroke);
var smoothedStroke = _inkSmoothingManager.SmoothStroke(lastTempStroke);
if (smoothedStroke != lastTempStroke)
{
inkCanvas.Strokes.Remove(lastTempStroke);
lastTempStroke = smoothedStroke;
inkCanvas.Strokes.Add(smoothedStroke);
}
}
}
catch (Exception ex)