community
community copied to clipboard
提高多指书写下的触控采样率
检查清单 | Checklist
- [x] 您确认此功能不存在于最新版本 | You confirm that this feature does not exist in the latest version.
- [x] 您确认此功能有开发的必要 | You confirm that this feature is worth developing.
- [x] 您确认此功能无法通过开发插件/自动化实现 | You confirm that this feature cannot be implemented through a plugin or automation.
- [x] 您没有为软件提交 Pull Request 或开发插件的能力 | You are unable to submit a Pull Request or develop a plugin for this software.
- [x] 您了解开发者无法及时回复和及时开发 | You understand that developers may not respond or implement features promptly.
- [ ] 我已经仔细阅读过选项里的内容,并且知道这个选项不用勾选。 | I have carefully read the options and know that this option does not need to be checked.
功能描述 | Description
适当增大多指书写下的触控采样率,或给用户自行选择【性能(高采样率)/均衡(低采样率)】
需求动机 | Motivation
快速书写时,目前触控的低采样率会因采集点不够密集,导致平滑的曲线变成锯齿状
期望设计 | Expected Design
增大多指书写下的触控采样率,或给用户自行选择【性能(高采样率)/均衡(低采样率)】
其他补充信息 | Additional Info
No response
上传有关文件 | Upload relevant files
No response
复现结果:部分复现(代码层面已定位根因,但本机无真实多点触控设备无法在 GUI 验证实际效果)
- 环境:Windows 11,ICC
net10@91b13e1f,Debug 构建 - 步骤:启动 ICC,进入白板界面
- 现象:本机无真实多点触控屏,无法验证"多指快速书写时采样点稀疏导致锯齿"的实际效果
- 初步分析(代码审查):
- 问题根因:
Ink Canvas/MainWindow_cs/MW_TouchEvents.cs第 2178 行InkCanvas_PreviewTouchMove方法中,每次触摸移动事件只读取最新的触摸点(e.GetTouchPoint(inkCanvas).Position),没有调用e.GetIntermediateTouchPoints(inkCanvas)来获取 WPF 合并到同一个事件中的中间采样点 - 结果:当系统将多个触摸采样点合并到一个
TouchMove事件时,中间的点被丢弃,只保留最后一个点,导致快速书写时采样点稀疏 - 全仓库搜索显示:除测试代码外,项目中没有任何地方调用
GetIntermediateTouchPoints - 建议修复方向:在
InkCanvas_PreviewTouchMove中遍历GetIntermediateTouchPoints()返回的点集合,逐点调用AppendInterpolatedTouchPoints/TryAppendRealtimeVelocityBrushTipInterpolatedPoints
- 问题根因:
- 需要补充:修复后需要在真实多点触控设备上验证效果,建议使用 ICC 的墨迹统计 HUD 对比修改前后的采样点密度
🤖 SuperDevBot(AI)自动回复,结论仅供维护者参考。
你好,啥时候可以实现(