Ovis_Decoration_3D_Line_Create()
摘要
创建一条 3D 直线。
语法
Ovis_Decoration_3D_Line_Create (from, to, color, thickness, layer_ptr, destroy_proc, user_state_ptr)
| 参数 | 类型 | 说明 |
|---|---|---|
from |
OvisT_3D_Position |
直线的起点 |
to |
OvisT_3D_Position |
直线的终点 |
color |
PrgT_Color |
颜色 |
thickness |
unsigned char |
直线的粗细,单位为像素 |
layer_ptr |
OvisT_Layer * |
Ovis 图层 |
destroy_proc |
OvisT_Decoration_State_Destroy_Proc |
销毁与该对象关联的数据并释放其内存 |
user_state_ptr |
void * |
可选的、由用户提供的装饰状态 |
返回类型
OvisT_3D_Line *
3D 直线
头文件
ovis_decoration.h
详情
此函数创建 Ovis 3D 直线,并指定该直线的各项属性。
示例
OvisT_3D_Position from, to;
OvisT_3D_Line * line;
PrgT_Color color = prg_color_from_string ("green");
OvisT_Entity * entity;
/* Draw a line between a moving entity and a fixed position */
Ovis_3D_Position_Entity_Set (&from, entity);
Ovis_3D_Position_Geodetic_Set (0, 20, 100);
line = Ovis_Decoration_3D_Line_Create (from, to, color, 3, OPC_NIL, OPC_NIL,
OPC_NIL);
错误
- 无
参考
- 使用函数
Ovis_Decoration_Color_Set()修改直线的颜色。 - 使用函数
Ovis_Decoration_Transparency_Set()修改直线的透明度。 - 使用函数
Ovis_Decoration_Flashing_Set()修改闪烁状态。 - 使用函数
Ovis_Shape_Pattern_Set()修改直线所使用的图案。 - 使用函数
Ovis_3D_Line_Endpoints_Set()修改直线的端点。 - 使用函数
Ovis_Line_Thickness_Set()修改直线的粗细。 - 使用函数
Ovis_Line_Arrows_Set()启用/禁用直线两端的箭头。