AnnFreehandHotspot.ts< / div >
EngineHelper.ts< / div >
AnnFreehandHotspot.js< / div >
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2021领德科技有限公司版权所有。<!--END Copyright notice-->
EngineHelper.js< / div >
AnnFreehandHotspot.html< / div >< / div >< div id ="GenericContainerEntry4201" class="GenericContainerEntry">
进口{EngineHelper}来自“. . / . . /工具/ EngineHelper”;出口类AnnObjects_FreehandHotspot {构造函数() {常量辅助=新EngineHelper ();helper.run (这共创);}create = (automation: lt.Annotations.Automation.AnnAutomation) => {//创建一个新的AnnResources实例,如果自动化管理器还没有let resources: lt.Annotations.Engine.AnnResources = automation.manager.resources;如果(资源= =零) {资源=新lt.Annotations.Engine.AnnResources ();Automation.manager.resources =资源;}//获取图像集合常量imagesResources: lt.Annotations.Engine。AnnPicture[] = resources.images;//添加我们的图片imagesResources.push (新lt.Annotations.Engine.AnnPicture (“资源/对象/ Hotspot.png”));常量pictureIndex:数量= imagesResources。长度- 1;常量英寸:数量= 720.0;//添加一个手绘热点对象常量hotspotObj: lt.Annotations.Engine.AnnFreehandHotspotObject =新lt.Annotations.Engine.AnnFreehandHotspotObject ();//设置手绘热点点hotspotObj.points.add (lt.LeadPointD。创建(1 * inch, 1 * inch));hotspotObj.points.add (lt.LeadPointD。创建(2 * inch, 2 * inch));hotspotObj.points.add (lt.LeadPointD。创建(1 * inch, 5 * inch));hotspotObj.points.add (lt.LeadPointD。创建(5 * inch, 5 * inch));hotspotObj.points.add (lt.LeadPointD。创建(4 * inch, 2 * inch));hotspotObj.points.add (lt.LeadPointD。创建(5 * inch, 1 * inch));//设置图片hotspotObj.set_defaultPicture (pictureIndex);//设置超链接hotspotObj。超链接=“//m.ahtuanjie.com”;//添加对象到自动化容器automation.container.children.add (hotspotObj);//选择对象automation.selectObject (hotspotObj);//与渲染引擎loadPicture事件挂钩,在资源加载后立即渲染容器automation.manager.renderingEngine。add_loadPicture((sender, e) => {automation.invalidate (lt.LeadRectD.empty);});}}
出口类EngineHelper {//自动化对象受保护的_automation: lt.Annotations.Automation.AnnAutomation =零;//图像查看器受保护的_viewer: lt.Controls.ImageViewer =零;构造函数() {//设置LEADTOOLS license。用实际的许可证文件替换此文件lt.RasterSupport.setLicenseUri (“https://demo.leadtools.com/licenses/v200/LEADTOOLSEVAL.txt”,“EVAL”,零);}公共运行(回调?:(automation: lt.Annotations.Automation.AnnAutomation, viewer: lt.Controls.ImageViewer) =>无效):无效{//创建查看器常量imageViewerDiv = document.getElementById(“imageViewerDiv”);常量createOptions: lt.Controls.ImageViewerCreateOptions =新lt.Controls.ImageViewerCreateOptions (imageViewerDiv);常量查看器:lt.Controls.ImageViewer =新lt.Controls.ImageViewer (createOptions);查看器。autoCreateCanvas =真正的;这._viewer =查看器;// PanZoom交互模式常量panZoom: lt.Controls.ImageViewerPanZoomInteractiveMode =新lt.Controls.ImageViewerPanZoomInteractiveMode ();//创建一个使用LEADTOOLS ImageViewer的自动化控制对象实例常量imageViewerAutomationControl: lt.188金宝搏beat体育官网 demo . annotations . imageViewerAutomationControl =新lt.188金宝搏beat体育官网Demos.Annotations.ImageViewerAutomationControl ();//附加图像查看器imageViewerAutomationControl。imageViewer =查看器;//设置图像查看器交互模式常量automationInteractiveMode: lt.188金宝搏beat体育官网 demo . annotations . automationInteractiveMode =新lt.188金宝搏beat体育官网Demos.Annotations.AutomationInteractiveMode ();automationInteractiveMode。automationControl = imageViewerAutomationControl;//设置图像URL查看器。imageUrl =“http://demo.leadtools.com/images/png/pngimage.png”;//使用HTML5渲染引擎创建并设置自动化管理器常量renderingEngine: lt.Annotations.Rendering。AnnHtml5RenderingEngine =新lt.Annotations.Rendering.AnnHtml5RenderingEngine ();常量manager: lt.Annotations.Automation.AnnAutomationManager = lt.Annotations.Automation.AnnAutomationManager.create(renderingEngine);//创建默认的自动化对象manager.createDefaultObjects ();//添加对象到对象选择元素常量currentobectidselect = document.getElementById(“currentObjectIdSelect”) HTMLSelectElement;//添加PanZoom选项currentObjectIdSelect.options [currentObjectIdSelect.options。长度]=新选项(“锅/缩放”lt.Annotations.Engine.AnnObject.none.toString ());常量automationObjCount:数量= manager.objects.count;为(设I = 0;i < automationObjCount;我+ +){//获取对象常量automationObj: lt.Annotations.Automation.AnnAutomationObject = manager.objects.item(i);//添加它的名字到选择元素常量名称:字符串= automationObj.name;常量id:字符串= automationObj.id.toString ();currentObjectIdSelect.options [currentObjectIdSelect.options。长度]=新选项(名称、id);}//钩子到它的变化事件currentObjectIdSelect.addEventListener (“改变”, () => {//获取对象ID常量id:数量=方法(currentObjectIdSelect.options [currentObjectIdSelect.selectedIndex] value);//设置为管理器中的当前对象经理。currentobectid = id;//如果这是“平移/缩放”选项,那么回到平移缩放,否则,设置我们的自动控制如果(id == lt.Annotations.Engine.AnnObject.none) {viewer.defaultInteractiveMode = panZoom;}其他的{viewer.defaultInteractiveMode = automationInteractiveMode;}});//当当前对象ID改变时,我们需要更新我们的select经理。add_currentobectidchanged ((sender, e) => {常量currentObjectId:数量= manager.currentObjectId;为(设I = 0;i < currentobectidselect .options.length;我+ +){常量id:数量[我]=方法(currentObjectIdSelect.options value);如果(id === currentobectid) {currentObjectIdSelect。selectedIndex = i;打破;}}});//默认缩放viewer.defaultInteractiveMode = panZoom;//设置自动化(同时创建容器)常量automation: lt.Annotations.Automation.AnnAutomation =新lt.Annotations.Automation。AnnAutomation(经理,imageViewerAutomationControl);这._automation =自动化;//添加处理程序,当图像大小改变时更新容器大小viewer.itemChanged。Add ((sender, e) => {常量container: lt.Annotations.Engine.AnnContainer = automation.container;容器。size = container.mapper.sizeToContainerCoordinates(viewer.imageSize);//为新图像创建新的canvas数据提供程序常量canvasDataProvider: lt.188金宝搏beat体育官网 demo . annotations . canvasDataProvider =新lt.188金宝搏beat体育官网Demos.Annotations.CanvasDataProvider (viewer.activeItem.canvas);imageViewerAutomationControl。automationDataProvider = canvasDataProvider;});//将此自动化设置为活动的自动化这._automation。活跃的=真正的;常量exampleButton = document.getElementById(“exampleButton”);exampleButton。Onclick = () => {如果(回调)回调(这._automation,这._viewer);}}}
进口{EngineHelper}来自“. . / . . /工具/ EngineHelper”;出口类AnnObjects_FreehandHotspot {构造函数(){常量辅助=新EngineHelper ();helper.run (这共创);}Create = (automation) => {//创建一个新的AnnResources实例,如果自动化管理器还没有Let resources = automation.manager.resources;如果(资源= =零) {资源=新lt.Annotations.Engine.AnnResources ();Automation.manager.resources =资源;}//获取图像集合常量imagesResources = resources.images;//添加我们的图片imagesResources.push (新lt.Annotations.Engine.AnnPicture (“资源/对象/ Hotspot.png”));常量pictureIndex = imagesResources。长度- 1;常量英寸= 720.0;//添加一个手绘热点对象常量hotspotObj =新lt.Annotations.Engine.AnnFreehandHotspotObject ();//设置手绘热点点hotspotObj.points.add (lt.LeadPointD。创建(1 * inch, 1 * inch));hotspotObj.points.add (lt.LeadPointD。创建(2 * inch, 2 * inch));hotspotObj.points.add (lt.LeadPointD。创建(1 * inch, 5 * inch));hotspotObj.points.add (lt.LeadPointD。创建(5 * inch, 5 * inch));hotspotObj.points.add (lt.LeadPointD。创建(4 * inch, 2 * inch));hotspotObj.points.add (lt.LeadPointD。创建(5 * inch, 1 * inch));//设置图片hotspotObj.set_defaultPicture (pictureIndex);//设置超链接hotspotObj。超链接=“//m.ahtuanjie.com”;//添加对象到自动化容器automation.container.children.add (hotspotObj);//选择对象automation.selectObject (hotspotObj);//与渲染引擎loadPicture事件挂钩,在资源加载后立即渲染容器automation.manager.renderingEngine。add_loadPicture((sender, e) => {automation.invalidate (lt.LeadRectD.empty);});}}
出口类EngineHelper {//自动化对象_automation =零;//图像查看器_view =零;构造函数(){//设置LEADTOOLS license。用实际的许可证文件替换此文件lt.RasterSupport.setLicenseUri (“https://demo.leadtools.com/licenses/v200/LEADTOOLSEVAL.txt”,“EVAL”,零);}运行(回调){//创建查看器常量imageViewerDiv = document.getElementById(“imageViewerDiv”);常量createOptions =新lt.Controls.ImageViewerCreateOptions (imageViewerDiv);常量观众=新lt.Controls.ImageViewer (createOptions);查看器。autoCreateCanvas =真正的;这._viewer =查看器;// PanZoom交互模式常量panZoom =新lt.Controls.ImageViewerPanZoomInteractiveMode ();//创建一个使用LEADTOOLS ImageViewer的自动化控制对象实例常量imageViewerAutomationControl =新lt.188金宝搏beat体育官网Demos.Annotations.ImageViewerAutomationControl ();//附加图像查看器imageViewerAutomationControl。imageViewer =查看器;//设置图像查看器交互模式常量automationInteractiveMode =新lt.188金宝搏beat体育官网Demos.Annotations.AutomationInteractiveMode ();automationInteractiveMode。automationControl = imageViewerAutomationControl;//设置图像URL查看器。imageUrl =“http://demo.leadtools.com/images/png/pngimage.png”;//使用HTML5渲染引擎创建并设置自动化管理器常量renderingEngine =新lt.Annotations.Rendering.AnnHtml5RenderingEngine ();常量manager = lt.Annotations.Automation.AnnAutomationManager.create(renderingEngine);//创建默认的自动化对象manager.createDefaultObjects ();//添加对象到对象选择元素常量currentobectidselect = document.getElementById(“currentObjectIdSelect”);//添加PanZoom选项currentObjectIdSelect.options [currentObjectIdSelect.options。长度]=新选项(“锅/缩放”lt.Annotations.Engine.AnnObject.none.toString ());常量automationObjCount = manager.objects.count;为(设I = 0;i < automationObjCount;我+ +){//获取对象常量automationObj = manager.objects.item(i);//添加它的名字到选择元素常量name = automationObj.name;常量id = automationObj.id.toString();currentObjectIdSelect.options [currentObjectIdSelect.options。长度]=新选项(名称、id);}//钩子到它的变化事件currentObjectIdSelect.addEventListener (“改变”, () => {//获取对象ID常量id = parseInt(currentobectidselect .options[currentobectidselect . selectedindex].value);//设置为管理器中的当前对象经理。currentobectid = id;//如果这是“平移/缩放”选项,那么回到平移缩放,否则,设置我们的自动控制如果(id == lt.Annotations.Engine.AnnObject.none) {viewer.defaultInteractiveMode = panZoom;}其他的{viewer.defaultInteractiveMode = automationInteractiveMode;}});//当当前对象ID改变时,我们需要更新我们的select经理。add_currentobectidchanged ((sender, e) => {常量currentobectid = manager. currentobectid;为(设I = 0;i < currentobectidselect .options.length;我+ +){常量id = parseInt(currentobectidselect .options[i].value);如果(id === currentobectid) {currentObjectIdSelect。selectedIndex = i;打破;}}});//默认缩放viewer.defaultInteractiveMode = panZoom;//设置自动化(同时创建容器)常量自动化=新lt.Annotations.Automation。AnnAutomation(经理,imageViewerAutomationControl);这._automation =自动化;//添加处理程序,当图像大小改变时更新容器大小viewer.itemChanged。Add ((sender, e) => {常量Container = automation.container;容器。size = container.mapper.sizeToContainerCoordinates(viewer.imageSize);//为新图像创建新的canvas数据提供程序常量canvasDataProvider =新lt.188金宝搏beat体育官网Demos.Annotations.CanvasDataProvider (viewer.activeItem.canvas);imageViewerAutomationControl。automationDataProvider = canvasDataProvider;});//将此自动化设置为活动的自动化这._automation。活跃的=真正的;常量exampleButton = document.getElementById(“exampleButton”);exampleButton。Onclick = () => {如果(回调)回调(这._automation,这._viewer);}}}
<!doctype html >< html lang =“en”>AnnObject示例| AnnFreehandHotspot AnnFreehandHotspot< >头< script src =“https://code.jquery.com/jquery-2.2.4.min.js”诚信=“sha256-BbhdlvQf / xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44 = "crossorigin =“匿名”> < /脚本>< script src =“. . / . . / LT / Leadtools.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Controls.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Annotations.Engine.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Annotations.Designers.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Annotations.Rendering.Javascript.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Annotations.Automation.js”> < /脚本>< script src =“. . / . . / LT / Leadtools.Annotations.BatesStamp.js”> < /脚本>< script src =“. . / . . / LT / Le188金宝搏beat体育官网adtools.Demos.js”> < /脚本>< script src =“. . / . . / LT / Le188金宝搏beat体育官网adtools.Demos.Annotations.js”> < /脚本><时尚># imageViewerDiv {边框:1px实体#000000;宽度:800 px;身高:800 px;background - color: # 7 f7f7f;}> < /风格<!——所有的演示文件都被捆绑并附加到窗口——>< script src =“. . / . . / bundle.js”类型=“text / javascript”> < /脚本>> < /头身体< >任意缩放或注释模式。在注释模式下,绘制新
< div ><选择id =“currentObjectIdSelect”> < /选择>< / div >< div >< input type =“按钮”id =“exampleButton”值=“例子”/><标签id =“exampleLabel”/>< / div >< div id =“imageViewerDiv”/>身体< / >< >脚本窗口。Onload = () =>新window.examples.AnnObjects.AnnFreehandHotspot ();> < /脚本< / html >
需求< / div >目标平台
帮助版本21.0.2021.6.30< / div ><!--BEGIN Copyright notice-->
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2021领德科技有限公司版权所有。<!--END Copyright notice-->
©1991 - 2021领德科技有限公司版权所有。<!--END Copyright notice-->
Leadtools.Annotations.Engine组装< / div >
188金宝搏的网址客服|支持|简介|< / div >< div id ="HeaderHelpVersion">
帮助版本21.0.2021.6.30< / div >< div id ="MobileTOC">
下载免费评估< / div >< div id ="searchBoxForm">
引用▼< / div >
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网络查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
LEADTOOLS聊天< / div >< div >
加载……< / div >< / div >< div id ="email-sent-container" class="hidden-group">
您的邮件已发送给技术支持!应该有人联系!如果你的事情很紧急,请回来聊天。
聊天时间:
周一至周五,美国东部时间上午8:30至下午6:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。
请填写姓名。
需要填写姓氏。
有效的电子邮件必须(e。g example@example.com)。
问题不能是空的。
支持销售许可< / div >
上传…
感谢您的反馈!祝你有愉快的一天!
谈话结束了。请填写下面的调查!
我的问题解决了。
该字段为必填项。
代理商技术知识< / div >
该字段为必填项。
代理人的沟通技巧< / div ><标签id ="communication-rating" class="rating-group">
该字段为必填项。
©1991 - 2021领德科技有限公司版权所有。<!--END Copyright notice-->
