draw_vertex_colour


语法:

draw_vertex_colour(x, y, col, alpha)


参数 描述
x The x coordinate of the vertex.
y The y coordinate of the vertex.
col The colour to draw this vertex with.
alpha The alpha to draw this vertex with (0-1).


返回:

N/A(无返回值)


描述

This function defines the position of a vertex for a primitive, with its own colour and alpha setting. The final look of the primitive will depend on the primitive type chosen to draw and the order with which you add the vertexes to it (see draw_primitive_begin for more information) and the vertexes with different colours and alphas will blend smoothly from one to the other. To end and draw the primitive you must call draw_primitive_end.


例如:

draw_primitive_begin(pr_trianglelist);
draw_vertex_colour(100, 100, c_blue, 0.1);
draw_vertex_colour(100, 200, c_red, 0.1);
draw_vertex_colour(150, 150, c_green, 1);
draw_primitive_end();

The above code will draw a semi-transparent triangle with each vertex coloured a different colour.