LegacyText 继承于FeatureGeometry,可用于创建Feature。代码如下:
Private m_table As MapInfo.Data.Table
Dim converter As MapInfo.Geometry.DisplayTransform = Me.MapControl1.Map.DisplayTransform
Dim MapPointText As New MapInfo.Geometry.DPoint()
converter.FromDisplay(PointF, MapPointText)
Dim rect As MapInfo.Geometry.DRect = New MapInfo.Geometry.DRect(MapPointText.x, MapPointText.y, MapPointText.x + 0.06, MapPointText.y + 0.06)
Dim txt As MapInfo.Geometry.LegacyText
txt = New MapInfo.Geometry.LegacyText(MapControl1.Map.GetDisplayCoordSys(), rect, Angle, Text)
f = New Feature(txt, Nothing)
m_table.InsertFeature(f)
本文介绍了一种利用LegacyText创建Feature的方法。通过实例演示了如何转换显示坐标、定义文本的位置和大小,并最终插入到表格中。
640

被折叠的 条评论
为什么被折叠?



