Ets_Nt_Subnet_Objview_Coords_Get()

摘要

获取子网的左上角和右下角坐标,使这些坐标能够包围子网视图中的所有对象。

语法

Ets_Nt_Subnet_Objview_Coords_Get (subnet_hndl, ul_x_ptr, ul_y_ptr, lr_x_ptr, lr_y_ptr)
参数 类型 说明
subnet_hndl EtsT_Obj_Handle 需要获取坐标的子网的对象句柄。
ul_x_ptr double * 指向左上角 x 位置的指针。
ul_y_ptr double * 指向左上角 y 位置的指针。
lr_x_ptr double * 指向右下角 x 位置的指针。
lr_y_ptr double * 指向右下角 y 位置的指针。

返回类型

EtsT_Compcode

若 subnet_hndl 不是子网,或 subnet_hndl 未安装在模型中,则返回 EtsC_Compcode_Failure,否则返回 EtsC_Compcode_Success。

头文件

ets_api_nt.h

详情

坐标通过 double 指针参数返回。这与 Ets_Nt_Subnet_View_Coords_Get() 类似,但 Ets_Nt_Subnet_Objview_Coords_Get() 不会返回整个子网边界的坐标,而只返回足以包围子网视图中所有对象的坐标(外加 15% 的边距)。这使该函数非常适合为 Web 用途捕获子网图像。导出到 HTML 操作使用的就是该函数。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com