Index

Package: Primitives

Description

package Allegro.Drawing.Primitives is
Allegro 5.0.9 - Primitives addon

Types

Point_2D

type Point_2D is
        record
            x, y : Float;
        end record;

Point_2D_Array

type Point_2D_Array is array (Integer range <>) of Point_2D;

Allegro_Vertex

type Allegro_Vertex is
        record
            x, y, z : Float;
            u, v    : Float;
            color   : Allegro_Color;
        end record;

Allegro_Vertex_Array

type Allegro_Vertex_Array is array (Integer range <>) of Allegro_Vertex;

Allegro_Prim_Attr

type Allegro_Prim_Attr is (
        ALLEGRO_PRIM_NONE,
        ALLEGRO_PRIM_POSITION,
        ALLEGRO_PRIM_COLOR_ATTR,
        ALLEGRO_PRIM_TEX_COORD,
        ALLEGRO_PRIM_TEX_COORD_PIXEL,
        ALLEGRO_PRIM_ATTR_NUM
    );

Allegro_Prim_Storage

type Allegro_Prim_Storage is (
        ALLEGRO_PRIM_FLOAT_2,
        ALLEGRO_PRIM_FLOAT_3,
        ALLEGRO_PRIM_SHORT_2,
        ALLEGRO_PRIM_COLOR    -- used with ALLEGRO_PRIM_COLOR_ATTR in Allegro_Vertex_Element
    );

Allegro_Vertex_Element

type Allegro_Vertex_Element is
        record
            attribute : Allegro_Prim_Attr;
            storage   : Allegro_Prim_Storage;
            offset    : Integer;
        end record;

Allegro_Vertex_Element_Array

type Allegro_Vertex_Element_Array is array (Integer range <>) of Allegro_Vertex_Element;

Allegro_Vertex_Decl

type Allegro_Vertex_Decl is limited private;

A_Allegro_Vertex_Decl

type A_Allegro_Vertex_Decl is access all Allegro_Vertex_Decl;

Allegro_Prim_Type

type Allegro_Prim_Type is (
        ALLEGRO_PRIM_LINE_LIST,
        ALLEGRO_PRIM_LINE_STRIP,
        ALLEGRO_PRIM_LINE_LOOP,
        ALLEGRO_PRIM_TRIANGLE_LIST,
        ALLEGRO_PRIM_TRIANGLE_STRIP,
        ALLEGRO_PRIM_TRIANGLE_FAN,
        ALLEGRO_PRIM_POINT_LIST,
        ALLEGRO_PRIM_NUM_TYPES
    );

Vertex_Index_Array

type Vertex_Index_Array is array (Natural range <>) of Integer;

Subprograms & Entries

Al_Init_Primitives_Addon

function Al_Init_Primitives_Addon return Boolean;

Al_Shutdown_Primitives_Addon

procedure Al_Shutdown_Primitives_Addon;

Al_Get_Allegro_Primitives_Version

function Al_Get_Allegro_Primitives_Version return Unsigned_32;

Al_Draw_Line

procedure Al_Draw_Line
( x1, y1, x2, y2: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Triangle

procedure Al_Draw_Triangle
( x1, y1, x2, y2, x3, y3: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Rectangle

procedure Al_Draw_Rectangle
( x1, y1, x2, y2: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Rounded_Rectangle

procedure Al_Draw_Rounded_Rectangle
( x1, y1, x2, y2: Float;
rx, ry: Float;
color: Allegro_Color;
thickness: Float );

Al_Calculate_Arc

procedure Al_Calculate_Arc
( dest: Address;
stride: Integer;
cx, cy: Float;
rx, ry: Float;
start_theta: Float;
delta_theta: Float;
thickness: Float;
num_segments: Integer );

Al_Calculate_Arc

procedure Al_Calculate_Arc
( dest: Point_2D_Array;
cx, cy: Float;
rx, ry: Float;
start_theta: Float;
delta_theta: Float;
thickness: Float );

Al_Draw_Circle

procedure Al_Draw_Circle
( cx, cy: Float;
r: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Ellipse

procedure Al_Draw_Ellipse
( cx, cy: Float;
rx, ry: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Arc

procedure Al_Draw_Arc
( cx, cy: Float;
r: Float;
start_theta: Float;
delta_theta: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Elliptical_Arc

procedure Al_Draw_Elliptical_Arc
( cx, cy: Float;
rx, ry: Float;
start_theta: Float;
delta_theta: Float;
color: Allegro_Color;
thickness: Float );

Al_Draw_Pieslice

procedure Al_Draw_Pieslice
( cx, cy: Float;
r: Float;
start_theta: Float;
delta_theta: Float;
color: Allegro_Color;
thickness: Float );

Al_Calculate_Spline

procedure Al_Calculate_Spline
( dest: Address;
stride: Integer;
points: Address;
thickness: Float;
num_segments: Integer );

Al_Calculate_Spline

procedure Al_Calculate_Spline
( dest: Point_2D_Array;
points: Point_2D_Array;
thickness: Float );

Al_Draw_Spline

procedure Al_Draw_Spline
( points: Address;
color: Allegro_Color;
thickness: Float );

Al_Draw_Spline

procedure Al_Draw_Spline
( points: Point_2D_Array;
color: Allegro_Color;
thickness: Float );

Al_Calculate_Ribbon

procedure Al_Calculate_Ribbon
( dest: Address;
dest_stride: Integer;
points: Address;
points_stride: Integer;
thickness: Float;
num_segments: Integer );

Al_Calculate_Ribbon

procedure Al_Calculate_Ribbon
( dest: Point_2D_Array;
points: Point_2D_Array;
thickness: Float );

Al_Draw_Ribbon

procedure Al_Draw_Ribbon
( points: Address;
stride: Integer;
color: Allegro_Color;
thickness: Float;
num_segments: Integer );

Al_Draw_Ribbon

procedure Al_Draw_Ribbon
( points: Point_2D_Array;
color: Allegro_Color;
thickness: Float );

Al_Draw_Filled_Triangle

procedure Al_Draw_Filled_Triangle
( x1, y1, x2, y2, x3, y3: Float;
color: Allegro_Color );

Al_Draw_Filled_Rectangle

procedure Al_Draw_Filled_Rectangle
( x1, y1, x2, y2: Float;
color: Allegro_Color );

Al_Draw_Filled_Ellipse

procedure Al_Draw_Filled_Ellipse
( cx, cy: Float;
rx, ry: Float;
color: Allegro_Color );

Al_Draw_Filled_Circle

procedure Al_Draw_Filled_Circle
( cx, cy: Float;
r: Float;
color: Allegro_Color );

Al_Draw_Filled_Pieslice

procedure Al_Draw_Filled_Pieslice
( cx, cy: Float;
r: Float;
start_theta: Float;
delta_theta: Float;
color: Allegro_Color );

Al_Draw_Filled_Rounded_Rectangle

procedure Al_Draw_Filled_Rounded_Rectangle
( x1, y1: Float;
x2, y2: Float;
rx, ry: Float;
color: Allegro_Color );

Al_Create_Vertex_Decl

function Al_Create_Vertex_Decl
( elements: Address;
stride: Integer ) return A_Allegro_Vertex_Decl;

Al_Create_Vertex_Decl

function Al_Create_Vertex_Decl
( elements: Allegro_Vertex_Element_Array;
stride: Positive ) return A_Allegro_Vertex_Decl;

Al_Destroy_Vertex_Decl

procedure Al_Destroy_Vertex_Decl
( decl: in out A_Allegro_Vertex_Decl );

Al_Draw_Prim

procedure Al_Draw_Prim
( vertices: Address;
decl: A_Allegro_Vertex_Decl;
texture: A_Allegro_Bitmap;
start: Integer;
stop: Integer;
primType: Allegro_Prim_Type );

Al_Draw_Prim

procedure Al_Draw_Prim
( vertices: Allegro_Vertex_Array;
texture: A_Allegro_Bitmap;
start: Integer;
stop: Integer;
primType: Allegro_Prim_Type );
Same as Al_Draw_Prim above, using the default Allegro_Vertex structure.

Al_Draw_Indexed_Prim

function Al_Draw_Indexed_Prim
( vertices: Address;
decl: A_Allegro_Vertex_Decl;
texture: A_Allegro_Bitmap;
indices: Vertex_Index_Array;
primType: Allegro_Prim_Type ) return Integer;

Al_Draw_Indexed_Prim

procedure Al_Draw_Indexed_Prim
( vertices: Address;
decl: A_Allegro_Vertex_Decl;
texture: A_Allegro_Bitmap;
indices: Vertex_Index_Array;
primType: Allegro_Prim_Type );
Same as Al_Draw_Indexed_Prim above, but errors are ignored.

Al_Draw_Indexed_Prim

procedure Al_Draw_Indexed_Prim
( vertices: Allegro_Vertex_Array;
texture: A_Allegro_Bitmap;
indices: Vertex_Index_Array;
primType: Allegro_Prim_Type );
Same as Al_Draw_Index_Prim above, using the default Allegro_Vertex structure.