|
*** Useful
Draw a 2D line on top of the rendered image.
Parameters:
x1,y1 x2,y2:
The two edges of the line.
0,0 is mapped to the top left corner of the screen
100,100 is mapped to the bottom right corner of the screen.
Return Value:
The return handle will work with all the polygon and layer APIs so one
can use STATE_polygon_set_color_fill() and STATE_polygon_set_translucent() to control the color and the translucency of the line.
See also:
Note that all the STATE_polygon_ and STATE_layer_ function could be used with a line_handle
STATE_polygon_disable(), STATE_polygon_set_color_fill(), STATE_polygon_set_translucent()
STATE_polygon_delete(), STATE_polygon_move(), STATE_layer_set_shape(), STATE_polygon_set_bitmap_fill()
STATE_object_create_line() for creating a 3D line
Example:
A)
draw a diagonal line from the top left corner of the screen to the bottom right corner
STATE_line_draw(0,0, 100,100, 2, 255,0,0); draw a red line
B)
drawing a semi transparent line
Note that line handles, layer handles and polygon handles can use each other functions !
DWORD handle=STATE_line_draw(0,0, 100,100, 2, 255,0,0); draw a red line
if(handle==NULL)
return(VR_ERROR); print error message or whatever ...
STATE_polygon_set_translucent(handle, NORMAL_GLASS); line handles can use all the polygon and layer API
|