Ovis_Decoration_2D_Segmented_Line_Create()
Abstract
Creates a 2D segmented line.
Syntax
Ovis_Decoration_2D_Segmented_Line_Create (from, to, num_segments, color, thickness, layer_ptr, destroy_proc, user_state_ptr)
| Argument | Type | Description |
|---|---|---|
from |
OvisT_2D_Position |
Start of the line |
to |
OvisT_2D_Position |
End of the line |
num_segments |
unsigned char |
Number of segments in the segmented line (at least 1) |
color |
PrgT_Color |
Color |
thickness |
unsigned char |
Thickness of the segmented line |
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_Segmented_Line *
The 2D segmented line
Header
ovis_decoration.h
Details
This function creates the Ovis 2D segmented line. It specifies the attributes of the segmented line.
Example
OvisT_2D_Position from, to;
OvisT_2D_Segmented_Line * line;
PrgT_Color color = prg_color_from_string ("green");
from.x = to.x = 0;
from.y = 50;
to.y = -50;
line = Ovis_Decoration_2D_Segmented_Line_Create (from, to, 3, color, 1,
OPC_NIL, OPC_NIL, OPC_NIL);
Errors
- Invalid 'from' 2D position <x,y>. 2D position values must be between –128 and 127.
- Invalid 'to' 2D position <x,y>. 2D position values must be between –128 and 127.
- Number of segments must be greater than 0.
Reference
- Use the function
Ovis_2D_Line_Endpoints_Set()to modify the endpoints of a line. - Use the function
Ovis_Decoration_Flashing_Set()to modify the flashing status of an entire line. - Use the function Ovis_Segmented_Line_Segment_Length_Set to specify the size of the segment as a percentage of a line's total size.
- Use the function
Ovis_Segmented_Line_Segment_Color_Set()to modify the color of a segment of a line. - Use the function
Ovis_Segmented_Line_Segment_Transparency_Set()to modify the transparency of a segment of a line. - Use the function
Ovis_Segmented_Line_Segment_Pattern_Set()to modify the pattern used in a segment of a line. - Use the function
Ovis_Segmented_Line_Segment_Thickness_Set()to modify the thickness of a segment of a line. - Use the function
Ovis_Segmented_Line_Segment_Arrows_Set()to enable/disable arrows at the ends of a segment of a line.