1al_draw_polyline(3)                                        al_draw_polyline(3)
2
3
4

NAME

6       al_draw_polyline - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_primitives.h>
10
11              void al_draw_polyline(const float* vertices, int vertex_stride,
12                 int vertex_count, int join_style, int cap_style,
13                 ALLEGRO_COLOR color, float thickness, float miter_limit)
14

DESCRIPTION

16       Draw a series of line segments.
17
18       · vertices - Interleaved array of (x, y) vertex coordinates
19
20       · vertex_stride  -  the  number of bytes between pairs of vertices (the
21         stride)
22
23       · vertex_count - Number of vertices in the array
24
25       · join_style - Member of ALLEGRO_LINE_JOIN(3) specifying how to  render
26         the joins between line segments
27
28       · cap_style  -  Member  of ALLEGRO_LINE_CAP(3) specifying how to render
29         the end caps
30
31       · color - Color of the line
32
33       · thickness - Thickness of the line, pass <= 0 to draw hairline lines
34
35       · miter_limit - Parameter for miter join style
36
37       The stride is normally 2 * sizeof(float) but may be more if the  vertex
38       coordinates are in an array of some structure type, e.g.
39
40              struct VertexInfo {
41                 float x;
42                 float y;
43                 int id;
44              };
45
46              void my_draw(struct VertexInfo verts[], int vertex_count, ALLEGRO_COLOR c)
47              {
48                 al_draw_polyline((float *)verts, sizeof(VertexInfo), vertex_count,
49                    ALLEGRO_LINE_JOIN_NONE, ALLEGRO_LINE_CAP_NONE, c, 1.0, 1.0);
50              }
51
52       The  stride  may also be negative if the vertices are stored in reverse
53       order.
54

SINCE

56       5.1.0
57

SEE ALSO

59       al_draw_polygon(3), ALLEGRO_LINE_JOIN(3), ALLEGRO_LINE_CAP(3)
60
61
62
63Allegro reference manual                                   al_draw_polyline(3)
Impressum