SYNOPSIS

  • #include <allegro5/allegro_primitives.h>
    
    void al_calculate_ribbon(float* dest, int dest_stride, const float *points,
       int points_stride, float thickness, int num_segments)
    
    

DESCRIPTION

Calculates a ribbon given an array of points. The ribbon will go through all of the passed points. If thickness <= 0, then num_segments of points are required in the destination buffer, otherwise twice as many are needed. The destination and the points buffer should consist of regularly spaced doublets of floats, corresponding to x and y coordinates of the vertices.

Parameters:

\[bu]

dest - Pointer to the destination buffer

\[bu]

dest_stride - Distance (in bytes) between starts of successive pairs of coordinates in the destination buffer

\[bu]

points - An array of pairs of coordinates for each point

\[bu]

points_stride - Distance (in bytes) between starts successive pairs of coordinates in the points buffer

\[bu]

thickness - Thickness of the spline ribbon

\[bu]

num_segments - The number of points to calculate

RELATED TO al_calculate_ribbon…

al_draw_ribbon(3alleg5), al_calculate_arc(3alleg5), al_calculate_spline(3alleg5)