Ets_Nt_Subnet_Image_Capture()
摘要
捕获子网的图形图像。
语法
Ets_Nt_Subnet_Image_Capture (subnet_handle, ul_x, ul_y, lr_x, lr_y, image_pixel_width, image_type, image_export_path)
| 参数 | 类型 | 说明 |
|---|---|---|
subnet_hndl |
EtsT_Obj_Handle |
目标子网。 |
ul_x |
double |
左上角的 x 坐标,采用子网的单位。 |
ul_y |
double |
左上角的 y 坐标,采用子网的单位。 |
lr_x |
double |
右下角的 x 坐标,采用子网的单位。 |
lr_y |
double |
右下角的 y 坐标,采用子网的单位。 |
image_pixel_width |
int |
捕获图像的宽度(像素),高度按比例缩放。 |
image_type |
EtsT_Image_Export_Type |
捕获图像的格式(见 image_type)。 |
image_export_path |
const char * |
保存图像的位置。 |
返回类型
EtsT_Compcode
若子网存在则返回 EtsC_Compcode_Success,否则返回 EtsC_Compcode_Failure。
头文件
ets_api_nt.h
详情
该函数按子网在工作区中的显示样子捕获其图形图像。你必须指定图像中所需子网部分的左上角与右下角坐标,以及结果图像的宽度。可使用 Ets_Nt_Model_Visible_Bounds_Get() 获取当前子网视图的尺寸。
若要以更多控制方式捕获子网图像(包括生成 HTML 的选项),参见 Ets_Nt_Subnet_Image_Capture_Core()。
image_type
image_type 必须是以下常量之一:
EtsC_Image_Export_Type_GIFEtsC_Image_Export_Type_TIFFEtsC_Image_Export_Type_PNG