allegro

This document pertains to drawing related methods found in the Allegro egg.

Please see the main [allegro] wiki page for more information.

  1. allegro
  2. Constants
  3. Enums
    1. primitive-attribute
    2. primitive-type
    3. primitive-storage
  4. Records
    1. transform
    2. vertex
    3. vertex-declaration
    4. vertex-element
  5. Functions
    1. Image Formats
    2. Primitives
    3. Transformations

Constants

Enums

primitive-attribute

[procedure] (primitive-attribute->int primitive-attribute)

primitive-attribute may be one of the following symbols:

[procedure] (int->primitive-attribute integer)

primitive-type

[procedure] (primitive-type->int primitive-type)

primitive-type may be one of the following symbols:

[procedure] (int->primitive-type integer)

primitive-storage

[procedure] (primitive-storage->int primitive-storage)

primitive-storage may be one of the following symbols:

[procedure] (int->primitive-storage integer)

Records

transform

[record] transform
[procedure] (make-transform*)
[procedure] (make-transform)
[procedure] (free-transform! transform)
[procedure] (transform-value transform i j)

vertex

[record] vertex
[procedure] (make-vertex*)
[procedure] (make-vertex)
[procedure] (free-vertex! vertex)
[procedure] (vertex-x vertex)
[setter] (vertex-x-set! vertex float)
[procedure] (vertex-y vertex)
[setter] (vertex-y-set! vertex float)
[procedure] (vertex-z vertex)
[setter] (vertex-z-set! vertex float)
[procedure] (vertex-u vertex)
[setter] (vertex-u-set! vertex float)
[procedure] (vertex-v vertex)
[setter] (vertex-v-set! vertex float)

vertex-declaration

[record] vertex-declaration

vertex-element

[record] vertex-element
[procedure] (make-vertex-element*)
[procedure] (make-vertex-element)
[procedure] (free-vertex-element! vertex-element)
[procedure] (vertex-element-attribute vertex-element)
[setter] (vertex-element-attribute-set! vertex-element primitive-attribute)
[procedure] (vertex-element-storage vertex-element)
[setter] (vertex-element-storage-set! vertex-element primitive-storage)
[procedure] (vertex-element-offset vertex-element)
[setter] (vertex-element-offset-set! vertex-element integer)

Functions

Image Formats

[procedure] (image-addon-install)

Implements al_init_image_addon.

[procedure] (image-addon-uninstall)

Implements al_shutdown_image_addon.

[procedure] (image-addon-version)

Implements al_get_allegro_image_version.

Primitives

<procedure>(primitives-addon-version)</primitives>

Implements al_get_allegro_primitives_version.

<procedure>(primitives-addon-install)</primitives>

Implements al_init_primitives_addon.

<procedure>(primitives-addon-uninstall)</primitives>

Implements al_shutdown_primitives_addon.

[procedure] (make-vertex-declaration* vertex-element integer)

Implements al_create_vertex_decl.

[procedure] (make-vertex-declaration vertex-element integer)

Implements al_create_vertex_decl, with (free-vertex-declaration!) declared as a finalizer.

[procedure] (free-vertex-declaration! vertex-declaration)

Implements al_destroy_vertex_decl.

[procedure] (draw-primitive (c-pointer vertices) vertex-declaration bitmap (integer start) (integer end) primitive-type)

Implements al_draw_prim.

[procedure] (draw-indexed-primitive (c-pointer vertices) vertex-declaration bitmap (s32-vector indices) (integer count) primitive-type)

Implements al_draw_indexed_prim.

<procedure>(draw-soft-triangle (vertex v1) (vertex v2) (vertex v3) (uintptr state)

                                                ((function void (uintptr vertex vertex vertex)) init)
                                                ((function void (uintptr int int int int)) first)
                                                ((function void (uintptr int)) step)
                                                ((function void (uintptr int int int)) draw))</procedure>

Implements al_draw_soft_triangle.

<procedure>(draw-soft-line (vertex v1) (vertex v2) (uintptr state)

                                             ((function void (uintptr int int vertex vertex)) first)
                                             ((function void (uintptr int)) step)
                                             ((function void (uintptr int int)) draw))</procedure>

Implements al_draw_soft_line.

[procedure] (draw-line (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))

Implements al_draw_line.

[procedure] (draw-triangle (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c) (float thickness))

Implements al_draw_triangle.

[procedure] (draw-rectangle (float x1) (float y1) (float x2) (float y2) (color c) (float thickness))

Implements al_draw_rectangle.

[procedure] (draw-rounded-rectangle (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c) (float thickness))

Implements al_draw_rounded_rectangle.

[procedure] (draw-circle (float cx) (float cy) (float r) (color c) (float thickness))

Implements al_draw_circle.

[procedure] (draw-ellipse (float cx) (float cy) (float rx) (float ry) (color c) (float thickness))

Implements al_draw_ellipse.

[procedure] (draw-arc (float cx) (float cy) (float r) (float start_theta) (float delta_theta) (color c) (float thickness))

Implements al_draw_arc.

[procedure] (draw-spline (f32vector points) (color c) (float thickness))

Implements al_draw_spline.

[procedure] (draw-ribbon (f32vector points) (integer32 stride) (color c) (float thickness) (integer32 num_segments))

Implements al_draw_ribbon.

[procedure] (draw-triangle/fill (float x1) (float y1) (float x2) (float y2) (float x3) (float y3) (color c))

Implements al_draw_filled_triangle.

[procedure] (draw-rectangle/fill (float x1) (float y1) (float x2) (float y2) (color c))

Implements al_draw_filled_rectangle.

[procedure] (draw-rounded-rectangle/fill (float x1) (float y1) (float x2) (float y2) (float rx) (float ry) (color c))

Implements al_draw_filled_rounded_rectangle.

[procedure] (draw-circle/fill (float cx) (float cy) (float r) (color c))

Implements al_draw_filled_circle.

[procedure] (draw-ellipse/fill (float cx) (float cy) (float rx) (float ry) (color c))

Implements al_draw_filled_ellipse.

[procedure] (calculate-arc (integer32 stride) (float cx) (float cy) (float rx) (float ry) (float start_theta) (float delta_theta) (float thickness) (integer32 num_segments))

Implements al_calculate_arc.

[procedure] (calculate-spline (integer32 stride) (f32vector points) (float thickness) (int num_segments))

Implements al_calculate_spline.

[procedure] (calculate-ribbon (integer32 dest_stride) ((const f32vector) points) (integer32 points_stride) (float thickness) (integer32 num_segments))

Implements al_calculate_ribbon.

Transformations

[procedure] (transform-use transform)

Implements al_use_transform.

[procedure] (transform-copy! transform transform)

Implements al_copy_transform.

[procedure] (transform-identity! transform)

Implements al_identity_transform.

[procedure] (transform-build! transform (float x) (float y) (float sx) (float sy) (float theta))

Implements al_build_transform.

[procedure] (transform-translate! transform (float x) (float y))

Implements al_translate_transform.

[procedure] (transform-scale! transform (float sx) (float sy))

Implements al_scale_transform.

[procedure] (transform-coordinates transform (float x) (float y))

Implements al_transform_coordinates; returns a 2-element list of the transformed coordinate pair.

[procedure] (transform-compose! transform transform)

Implements al_compose_transform.

[procedure] (transform-invert! transform)

Implements al_invert_transform.

[procedure] (transform-check-inverse transform float)

Implements al_check_inverse.

[procedure] (current-transform)

Implements al_get_current_transform.