首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >C# Microsoft.Ink 手写识别(HandWriting Recognition)设置写字宽度颜色

C# Microsoft.Ink 手写识别(HandWriting Recognition)设置写字宽度颜色

作者头像
云未归来
发布2025-07-18 12:23:24
发布2025-07-18 12:23:24
1290
举报

C# Microsoft.Ink 手写识别源代码参考http://www.cnblogs.com/geovindu/p/3702427.html,里面介绍的很详细,而且微软官方给的资料很详细,但是唯一没给出怎么设置写字宽度和写字时候的颜色,这里我把方法分享给大家,注意此方法我已经测试过,确实可用,请在窗口加载时候修改如下代码

 private void Form1_Load(object sender, EventArgs e)         {             //this.rct.RecognitionWithAlternates += new RecognizerContextRecognitionWithAlternatesEventHandler(rct_RecognitionWithAlternates);             ic = new InkCollector(ink_here.Handle);             this.ic.Stroke += new InkCollectorStrokeEventHandler(ic_Stroke);             DrawingAttributes da = new DrawingAttributes();//增加代码             da.Width = 100f;//这里设置写字宽度,da.Color可以设置颜色,这里不再给出颜色,直接设置da.Color即可             ic.DefaultDrawingAttributes = da;             ic.Enabled = true;             ink_();             //   this.ic.Stroke += new InkCollectorStrokeEventHandler(ic_Stroke);             this.rct.RecognitionWithAlternates += new RecognizerContextRecognitionWithAlternatesEventHandler(rct_RecognitionWithAlternates);             rct.Strokes = ic.Ink.Strokes;         }

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2025-07-17,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档