improve:多指书写

This commit is contained in:
2025-12-20 19:36:16 +08:00
parent e70a486362
commit a922654c17
2 changed files with 16 additions and 6 deletions
+7 -2
View File
@@ -19,6 +19,12 @@ namespace Ink_Canvas.Helpers
{
Visual = visual;
AddVisualChild(visual);
CacheMode = new BitmapCache();
RenderOptions.SetBitmapScalingMode(this, BitmapScalingMode.LowQuality);
RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
RenderOptions.SetCachingHint(this, CachingHint.Cache);
}
public DrawingVisual Visual { get; }
@@ -54,8 +60,7 @@ namespace Ink_Canvas.Helpers
{
_drawingAttributes = drawingAttributes;
// 启用硬件加速
RenderOptions.SetBitmapScalingMode(this, BitmapScalingMode.HighQuality);
RenderOptions.SetBitmapScalingMode(this, BitmapScalingMode.LowQuality);
RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
RenderOptions.SetCachingHint(this, CachingHint.Cache);
}
+6 -1
View File
@@ -3958,7 +3958,12 @@
MouseUp="inkCanvas_MouseUp"
ManipulationStarting="inkCanvas_ManipulationStarting"
SelectionChanged="inkCanvas_SelectionChanged"
StrokeCollected="inkCanvas_StrokeCollected" ClipToBounds="False" Background="Transparent" />
StrokeCollected="inkCanvas_StrokeCollected"
ClipToBounds="False"
Background="Transparent"
RenderOptions.BitmapScalingMode="LowQuality"
RenderOptions.EdgeMode="Aliased"
RenderOptions.CachingHint="Cache" />
<Canvas x:Name="EraserOverlayCanvas"
Background="Transparent"