chickadee » allegro » drawing

Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

allegro

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

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

Constants

Enums

primitive-attribute

primitive-attribute->int primitive-attributeprocedure

primitive-attribute may be one of the following symbols:

  • position
  • color
  • texture-coordinate
  • texture-pixel-coordinate
int->primitive-attribute integerprocedure

primitive-type

primitive-type->int primitive-typeprocedure

primitive-type may be one of the following symbols:

  • line-list
  • line-strip
  • line-loop
  • triangle-list
  • triangle-strip
  • point-list
int->primitive-type integerprocedure

primitive-storage

primitive-storage->int primitive-storageprocedure

primitive-storage may be one of the following symbols:

  • float-2
  • float-3
  • short-2
int->primitive-storage integerprocedure

Records

transform

transformrecord
make-transform*procedure
make-transformprocedure
free-transform! transformprocedure
transform-value transform i jprocedure

vertex

vertexrecord
make-vertex*procedure
make-vertexprocedure
free-vertex! vertexprocedure
vertex-x vertexprocedure
vertex-x-set! vertex floatsetter
vertex-y vertexprocedure
vertex-y-set! vertex floatsetter
vertex-z vertexprocedure
vertex-z-set! vertex floatsetter
vertex-u vertexprocedure
vertex-u-set! vertex floatsetter
vertex-v vertexprocedure
vertex-v-set! vertex floatsetter

vertex-declaration

vertex-declarationrecord

vertex-element

vertex-elementrecord
make-vertex-element*procedure
make-vertex-elementprocedure
free-vertex-element! vertex-elementprocedure
vertex-element-attribute vertex-elementprocedure
vertex-element-attribute-set! vertex-element primitive-attributesetter
vertex-element-storage vertex-elementprocedure
vertex-element-storage-set! vertex-element primitive-storagesetter
vertex-element-offset vertex-elementprocedure
vertex-element-offset-set! vertex-element integersetter

Functions

Image Formats

image-addon-installprocedure

Implements al_init_image_addon.

image-addon-uninstallprocedure

Implements al_shutdown_image_addon.

image-addon-versionprocedure

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.

make-vertex-declaration* vertex-element integerprocedure

Implements al_create_vertex_decl.

make-vertex-declaration vertex-element integerprocedure

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

free-vertex-declaration! vertex-declarationprocedure

Implements al_destroy_vertex_decl.

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

Implements al_draw_prim.

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

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.

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

Implements al_draw_line.

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

Implements al_draw_triangle.

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

Implements al_draw_rectangle.

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

Implements al_draw_rounded_rectangle.

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

Implements al_draw_circle.

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

Implements al_draw_ellipse.

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

Implements al_draw_arc.

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

Implements al_draw_spline.

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

Implements al_draw_ribbon.

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

Implements al_draw_filled_triangle.

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

Implements al_draw_filled_rectangle.

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

Implements al_draw_filled_rounded_rectangle.

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

Implements al_draw_filled_circle.

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

Implements al_draw_filled_ellipse.

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

Implements al_calculate_arc.

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

Implements al_calculate_spline.

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

Implements al_calculate_ribbon.

Transformations

transform-use transformprocedure

Implements al_use_transform.

transform-copy! transform transformprocedure

Implements al_copy_transform.

transform-identity! transformprocedure

Implements al_identity_transform.

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

Implements al_build_transform.

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

Implements al_translate_transform.

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

Implements al_scale_transform.

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

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

transform-compose! transform transformprocedure

Implements al_compose_transform.

transform-invert! transformprocedure

Implements al_invert_transform.

transform-check-inverse transform floatprocedure

Implements al_check_inverse.

current-transformprocedure

Implements al_get_current_transform.

Contents »