【发布时间】:2018-08-22 10:13:05
【问题描述】:
我只能找到使用 C# 的代码,但也许有人可以将其翻译成 vb.net 或协助 VB.NET 代码可以帮助我。我只是一个使用 VB.net 的初学者。我去了leadtools论坛,但是没有我想要的例子,而且大多数例子都是用C#写的
void HiliteWord(AnnContainer container, IOcrPage page, OcrWord word)
{
// Get bounds of word as LeadRectD
LeadRectD bounds = word.Bounds.ToRectangle(page.DpiX, page.DpiY).ToLeadRectD();
// Convert to annotation coordinates
bounds = container.Mapper.RectToContainerCoordinates(bounds);
// Create the annotation
AnnHiliteObject hilite = new AnnHiliteObject();
hilite.Points.Clear();
hilite.Points.Add(bounds.TopLeft);
hilite.Points.Add(bounds.TopRight);
hilite.Points.Add(bounds.BottomRight);
hilite.Points.Add(bounds.BottomLeft);
// Add to container
container.Children.Add(hilite);
}
【问题讨论】:
-
看看converter.telerik.com 这个站点将允许您粘贴代码并单击转换按钮 - 将其添加到您的书签中
-
顺便说一句.. 欢迎来到 Stack Overflow。在这里正确提问非常重要。看看How to Ask 和minimal reproducible example。就目前而言,您的问题是题外话,因为这不是询问代码翻译。它是针对有关现有代码的特定问题的问题。不要让反对票或关闭票让你失望。谢谢
标签: vb.net position ocr leadtools-sdk