当前位置:编程学习 > VB >>

vb 用gdi技术取汉字的笔画顺序,并显示每个笔画的书写过程如何弄

vb 用gdi技术取汉字的笔画顺序,并显示每个笔画的书写过程如何弄。gdi的api函数一大堆,功能介绍也没。请大师指点一下。谁有vb gdi的api函数功能介绍的话给共享一下。
' GraphicsPath Functions (ALL)
Public Declare Function GdipCreatePath Lib "gdiplus" (ByVal brushmode As FillMode, path As Long) As GpStatus
' NOTE: The types parameter is treated as a byte array
Public Declare Function GdipCreatePath2 Lib "gdiplus" (Points As POINTF, types As Any, ByVal count As Long, brushmode As FillMode, path As Long) As GpStatus
Public Declare Function GdipCreatePath2I Lib "gdiplus" (Points As POINTL, types As Any, ByVal count As Long, brushmode As FillMode, path As Long) As GpStatus
Public Declare Function GdipClonePath Lib "gdiplus" (ByVal path As Long, clonePath As Long) As GpStatus
Public Declare Function GdipDeletePath Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipResetPath Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipGetPointCount Lib "gdiplus" (ByVal path As Long, count As Long) As GpStatus
' NOTE: The types parameter is treated as a byte array
Public Declare Function GdipGetPathTypes Lib "gdiplus" (ByVal path As Long, types As Any, ByVal count As Long) As GpStatus
Public Declare Function GdipGetPathPoints Lib "gdiplus" (ByVal path As Long, Points As POINTF, ByVal count As Long) As GpStatus
Public Declare Function GdipGetPathPointsI Lib "gdiplus" (ByVal path As Long, Points As POINTL, ByVal count As Long) As GpStatus
Public Declare Function GdipGetPathFillMode Lib "gdiplus" (ByVal path As Long, ByVal brushmode As FillMode) As GpStatus
Public Declare Function GdipSetPathFillMode Lib "gdiplus" (ByVal path As Long, ByVal brushmode As FillMode) As GpStatus
Public Declare Function GdipGetPathData Lib "gdiplus" (ByVal path As Long, pdata As PathData) As GpStatus
Public Declare Function GdipStartPathFigure Lib "gdiplus" (ByVal path As Long) As GpStatus '不关闭当前子路径,就开始新子路径
Public Declare Function GdipClosePathFigure Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipClosePathFigures Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipSetPathMarker Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipClearPathMarkers Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipReversePath Lib "gdiplus" (ByVal path As Long) As GpStatus
Public Declare Function GdipGetPathLastPoint Lib "gdiplus" (ByVal path As Long, lastPoint As POINTF) As GpStatus

笔画顺序可以用GDI来获取?新鲜。。。。 当然,完全可以的。 看来LZ是高手,呵呵,那些函数应该是GDI+的,不是GDI的
这个应该是做不到的。 全是定义,有P用? 也许是我孤陋寡闻了,我觉得是不可能的 参考
笔画拆拆
软件 我也觉得楼主是开玩笑的
引用 2 楼 lj77916 的回复:
当然,完全可以的。

有可以提取笔画顺序的API么求指点
引用 6 楼 hpygzhx520 的回复:
也许是我孤陋寡闻了,我觉得是不可能的

同感…… 关键是提取笔画及其相对位置的算法。

汉字的笔顺规则还是很规整的。

如果能使笔画提取的顺序符合笔顺规则,那就事半功倍。
当然,还有一种方法,那就是利用模式识别认出汉字,再到数据库中查笔顺信息。

然后利用笔顺信息分解字型的笔画。这样难度会更小。
字体本身就没有"笔划"与"笔顺"这样的概念,它是一个整体的点阵图或矢量图.

我也不认为系统有这样的API能得到笔划笔顺,除上面of123所说的自己写.

愿意听听楼主所说的方案. 只能人工建笔顺库,再用颜色区分不同的笔画(再扫描建笔画点阵坐标库),两者结合可以造出教学软件(CAI) 其实笔画可以取,但是顺序就不好说了,OFFICE WORD 2330 可以拆分 楷体_GB2312 的矢量信息变成图元而分离出每一个笔画, 相关的OLE接口还不太清楚,如果不考虑顺序可以研究一下 唔,这就是矢量图的好处。

我想,利用“先上后下,先左后右”的规则,可以正确分解出大多数字型的笔顺。
引用 7 楼 zhao4zhong1 的回复:
参考
笔画拆拆
软件

正解在此!


关键的关键是自己要能写实现的代码:
http://blog.csdn.net/prsniper/article/details/12996109
等待 “先上后下,先左后右”的规则  得到笔画顺序。
补充:VB ,  API
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,