SYNOPSIS

  • #include <allegro5/allegro_primitives.h>
    
    void al_calculate_arc(float* dest, int stride, float cx, float cy,
       float rx, float ry, float start_theta, float delta_theta, float thickness,
       int num_segments)
    
    

DESCRIPTION

Calculates an elliptical arc, and sets the vertices in the destination buffer to the calculated positions. If thickness <= 0, then num_points of points are required in the destination, otherwise twice as many are needed. The destination buffer should consist of regularly spaced (by distance of stride bytes) doublets of floats, corresponding to x and y coordinates of the vertices.

Parameters:

\[bu]

dest - The destination buffer

\[bu]

stride - Distance (in bytes) between starts of successive pairs of coordinates

\[bu]

cx, cy - Center of the arc

\[bu]

rx, ry - Radii of the arc

\[bu]

start_theta - The initial angle from which the arc is calculated

\[bu]

delta_theta - Angular span of the arc (pass a negative number to switch direction)

\[bu]

thickness - Thickness of the arc

\[bu]

num_points - The number of points to calculate

RELATED TO al_calculate_arc…

al_draw_arc(3alleg5), al_calculate_spline(3alleg5), al_calculate_ribbon(3alleg5)