1al_calculate_spline(3) Library Functions Manual al_calculate_spline(3)
2
3
4
6 al_calculate_spline
7
9 #include <allegro5/allegro_primitives.h>
10
11 void al_calculate_spline(float* dest, int stride, float points[8],
12 float thickness, int num_segments)
13
15 Calculates a Bézier spline given 4 control points. If thickness <= 0,
16 then num_segments of points are required in the destination, otherwise
17 twice as many are needed. The destination buffer should consist of
18 regularly spaced (by distance of stride bytes) doublets of floats, cor‐
19 responding to x and y coordinates of the vertices.
20
21 Parameters:
22
23 · dest - The destination buffer
24
25 · stride - Distance (in bytes) between starts of successive pairs of
26 coordinates
27
28 · points - An array of 4 pairs of coordinates of the 4 control points
29
30 · thickness - Thickness of the spline ribbon
31
32 · num_segments - The number of points to calculate
33
35 al_draw_spline(3), al_calculate_arc(3), al_calculate_ribbon(3)
36
37
38
39Allegro reference manual al_calculate_spline(3)