Ovis_Decoration_2D_Triangle_Create()

Abstract

Creates a 2D triangle.

Syntax

Ovis_Decoration_2D_Triangle_Create (center, a, b, c, color, filled, layer_ptr, destroy_proc, user_state_ptr)
Argument Type Description
center OvisT_2D_Position Center of the triangle
a OvisT_2D_Corner Corner a of the triangle
b OvisT_2D_Corner Corner b of the triangle
c OvisT_2D_Corner Corner c of the triangle
color PrgT_Color Color
filled OvisT_Boolean Indicates fill
layer_ptr OvisT_Layer * Ovis layer
destroy_proc OvisT_Decoration_State_Destroy_Proc Destroys the data associated with the object and deallocates its memory
user_state_ptr void * Optional user-provided state of the decoration

Return Type

OvisT_2D_Triangle *

The 2D triangle

ovis_decoration.h

Details

This function creates an Ovis 2D triangle. It specifies the attributes of the triangle.

Example

OvisT_2D_Position     center;
OvisT_2D_Corner      a, b, c;
OvisT_2D_Triangle   * triangle;

/* A right angle triangle at the center */
center.x = 10; center.y = 50;
a.x_offset = a.y_offset = 0;
b.x_offset = 0; b.y_offset = -0.2;
c.x_offset = 0.2; c.y_offset = 0;
triangle = Ovis_Decoration_2D_Triangle_Create (center, a, b, c,
	prg_color_from_string ("red"), OvisC_True, OPC_NIL, OPC_NIL, OPC_NIL);

Errors

  • Invalid center 2D position <x,y>. 2D position values must be between -128 and 127.

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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