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 bitmap related methods found in the Allegro egg.

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

  1. Outdated egg!
  2. allegro
  3. Enums
    1. bitmap-flag
    2. blend-operation
    3. blending-mode
    4. blitting-flag
    5. locking-flag
    6. pixel-format
  4. Records
    1. bitmap
    2. locked-region
  5. Functions
    1. Bitmap
    2. Bitmap I/O

Enums

bitmap-flag

[procedure] (bitmap-flag->int bitmap-flag)

bitmap-flag may be one of the following symbols:

[procedure] (int->bitmap-flag integer)

blend-operation

[procedure] (blend-operation->int blend-operation)

blend-operation may be one of the following symbols:

[procedure] (int->blend-operation integer)

blending-mode

[procedure] (blending-mode->int blending-mode)

blending-mode may be one of the following symbols:

[procedure] (int->blending-mode integer)

blitting-flag

[procedure] (blitting-flag->int blitting-flag)

blitting-flag may be one of the following symbols:

[procedure] (int->blitting-flag integer)

locking-flag

[procedure] (locking-flag->int locking-flag)

locking-flag may be one of the following symbols:

[procedure] (int->locking-flag integer)

pixel-format

[procedure] (pixel-format->int pixel-format)

pixel-format may be one of the following symbols:

[procedure] (int->pixel-format integer)

Records

bitmap

[record] bitmap

locked-region

[record] locked-region
[procedure] (free-locked-region! locked-region)
[procedure] (locked-region-data locked-region)
[procedure] (locked-region-format locked-region)
[procedure] (locked-region-pitch locked-region)
[procedure] (locked-region-pixel-size locked-region)

Functions

Bitmap

[procedure] (new-bitmap-format-set! pixel-format)

Implements al_set_new_bitmap_format.

[procedure] (new-bitmap-format)

Implements al_get_new_bitmap_flags.

[procedure] (new-bitmap-flags-set! bitmap-flag)

Implements al_set_new_bitmap_flags.

[procedure] (new-bitmap-flags)

Implements al_get_new_bitmap_flags.

[procedure] (new-bitmap-add-flag bitmap-flag)

Implements al_add_new_bitmap_flag.

[procedure] (make-bitmap* (integer width) (integer height))

Implements al_create_bitmap.

[procedure] (make-bitmap (integer width) (integer height))

Implements al_create_bitmap, with (free-bitmap!) declared as a finalizer.

[procedure] (bitmap-draw bitmap (float dx) (float dy) bitmap-flag)

Implements al_draw_bitmap.

[procedure] (draw-bitmap bitmap (float dx) (float dy) bitmap-flag)

Implements al_draw_bitmap.

[procedure] (bitmap-draw-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_bitmap_region.

[procedure] (draw-bitmap-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_bitmap_region.

[procedure] (bitmap-draw-scaled bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))

Implements al_draw_scaled_bitmap.

[procedure] (draw-scaled-bitmap bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer bitmap-flags))

Implements al_draw_scaled_bitmap.

[procedure] (bitmap-draw-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))

Implements al_draw_rotated_bitmap.

[procedure] (draw-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))

Implements al_draw_rotated_bitmap.

[procedure] (bitmap-draw-scaled-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))

Implements al_draw_scaled_rotated_bitmap.

[procedure] (draw-scaled-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer bitmap-flags))

Implements al_draw_scaled_rotated_bitmap.

[procedure] (bitmap-draw-tinted (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_tinted_bitmap.

[procedure] (draw-tinted-bitmap (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_tinted_bitmap.

[procedure] (bitmap-draw-tinted-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_tinted_bitmap_region.

[procedure] (draw-tinted-bitmap-region (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))

Implements al_draw_tinted_bitmap_region.

[procedure] (bitmap-draw-tinted-scaled (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))

Implements al_draw_tinted_scale_bitmap.

[procedure] (draw-tinted-scaled-bitmap (bitmap bmp) (color tint) (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (float dw) (float dh) (integer flags))

Implements al_draw_tinted_scale_bitmap.

[procedure] (bitmap-draw-tinted-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))

Implements al_draw_tinted_rotated_bitmap.

[procedure] (draw-tinted-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float angle) (integer flags))

Implements al_draw_tinted_rotated_bitmap.

[procedure] (bitmap-draw-tinted-scaled-rotated (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))

Implements al_draw_tinted_scaled_rotated_bitmap.

[procedure] (draw-tinted-scaled-rotated-bitmap (bitmap bmp) (color tint) (float cx) (float cy) (float dx) (float dy) (float xscale) (float yscale) (float angle) (integer flags))

Implements al_draw_tinted_scaled_rotated_bitmap.

[procedure] (bitmap-lock*! bitmap pixel-format (integer locking-flag))

Implements al_lock_bitmap.

[procedure] (lock-bitmap*! bitmap pixel-format (integer locking-flag))

Implements al_lock_bitmap.

[procedure] (bitmap-lock-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))

Implements al_lock_bitmap_region.

[procedure] (lock-bitmap-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))

Implements al_lock_bitmap_region.

[procedure] (bitmap-unlock! bitmap)

Implements al_unlock_bitmap.

[procedure] (unlock-bitmap! bitmap)

Implements al_unlock_bitmap.

[procedure] (bitmap-lock! bitmap pixel-format (integer bitmap-flags))

Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.

[procedure] (lock-bitmap! bitmap pixel-format (integer bitmap-flags))

Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.

[procedure] (bitmap-lock-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))

Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.

[procedure] (lock-bitmap-region! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer bitmap-flags))

Implements al_lock_bitmap_region, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers.

[procedure] (bitmap-pixel! (bitmap bmp) (int x) (int y) (color c))

Sets the provided color struct to the color value at the given coordinates.

[procedure] (bitmap-pixel* (bitmap bmp) (int x) (int y))

Returns a new color struct of the color value at the given coordinates.

[procedure] (bitmap-pixel (bitmap bmp) (int x) (int y))

Returns a new color struct of the color value at the given coordinates, with (free-color!) declared as a finalizer.

[procedure] (bitmap-width bitmap)

Implements al_get_bitmap_width.

[procedure] (bitmap-height bitmap)

Implements al_get_bitmap_height.

[procedure] (bitmap-format bitmap)

Implements al_get_bitmap_format.

[procedure] (bitmap-flags bitmap)

Implements al_get_bitmap_flags.

[procedure] (bitmap-mask->alpha! bitmap color)

Implements al_convert_mask_to_alpha.

[procedure] (bitmap-clone* bitmap)

Implements al_clone_bitmap.

[procedure] (bitmap-clone bitmap)

Implements al_clone_bitmap, with (free-bitmap!) declared as a finalizer.

[procedure] (bitmap-locked? bitmap)

Implements al_is_bitmap_locked.

[procedure] (bitmap-put-pixel! bitmap (integer x) (integer y) (color c))

Implements _al_put_pixel.

[procedure] (make-sub-bitmap* bitmap (integer x) (integer y) (integer width) (integer height))

Implements al_create_sub_bitmap.

[procedure] (make-sub-bitmap bitmap (integer x) (integer y) (integer width) (integer height))

Implements al_create_sub_bitmap, with (free-bitmap!) declared as a finalizer.

[procedure] (sub-bitmap? bitmap)

Implements al_is_sub_bitmap.

[procedure] (put-pixel (integer x) (integer y) (color c))

Implements al_put_pixel.

[procedure] (put-blended-pixel (integer x) (integer y) (color c))

Implements al_put_blended_pixel.

[procedure] (pixel-size pixel-format)

Implements al_get_pixel_size.

[procedure] (color-map-rgb! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))

Maps rgb values onto the provided color struct, implementing al_map_rgb.

[procedure] (color-map-rgba! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))

Maps rgba values onto the provided color struct, implementing al_map_rgba.

[procedure] (color-map-rgb-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))

Maps rgb values onto the provided color struct, implementing al_map_rgb_f.

[procedure] (color-map-rgba-float! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b) (unsigned-byte a))

Maps rgba values onto the provided color struct, implementing al_map_rgba_f.

[procedure] (map-rgb* r g b)

Returns a new color struct mapped to the given rgb values.

[procedure] (map-rgb r g b)

Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.

[procedure] (map-rgba* r g b a)

Prodcues a new color struct mapped to the given rgba values.

[procedure] (map-rgba r g b a)

Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.

[procedure] (map-rgb-float* r g b)

Returns a new color struct mapped to the given rgb values.

[procedure] (map-rgb-float r g b)

Returns a new color struct mapped to the given rgb values, with (free-color!) declared as a finalizer.

[procedure] (map-rgba-float* r g b a)

Returns a new color struct mapped to the given rgba values.

[procedure] (map-rgba-float r g b a)

Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer.

[procedure] (color-unmap-rgb color)

Returns a 3-element list of the rgb values representing a given color struct.

[procedure] (color-unmap-rgba color)

Returns a 4-element list of the rgba values representing a given color struct.

[procedure] (color-unmap-rgb-float color)

Returns a 3-element list of the rgb values representing a given color struct.

[procedure] (color-unmap-rgba-float color)

Returns a 4-element list of the rgb values representing a given color struct.

[procedure] (pixel-format-bits pixel-format)

Implements al_get_pixel_format_bits.

[procedure] (clipping-rectangle)

Returns a 4-element list of the x, y, width and height values of the current clipping rectangle.

[procedure] (clippingle-rectangle-set! (integer x) (integer y) (integer width) (integer height))

Sets the current clipping rectangle.

[procedure] (blender)

Returns a 3-element list of the op, source and destination of the current blender.

[procedure] (blender-set! (blend-operation op) (integer source) (integer destination))

Implements al_set_blender.

[procedure] (separate-blender)

Returns a 6-element list of the op, source, destination, alpha op, alpha source, and alpha destination.

[procedure] (separate-blender-set! (blend-operation op) (integer src) (integer destination) (integer alpha-op) (integer alpha-source) (integer alpha-destination))

Implements al_set_separate_blender.

Bitmap I/O

[procedure] (register-bitmap-loader (string extension) (function bitmap ((const c-string))))

Implements al_register_bitmap_loader.

[procedure] (register-bitmap-file-loader (string extension) (function bitmap (file)))

Implements al_register_bitmap_loader_f.

[procedure] (register-bitmap-saver (string extension) ((function bool ((const c-string) bitmap)) saver))

Implements al_register_bitmap_saver.

[procedure] (register-bitmap-file-saver (string extension) ((function bool (file bitmap)) saver))

Implements al_register_bitmap_saver_f.

[procedure] (load-bitmap* string)

Implements al_load_bitmap.

[procedure] (load-bitmap string)

Implements al_load_bitmap, with (free-bitmap!) declared as a finalizer.

[procedure] (load-bitmap-from-file* file string)

Implements al_load_bitmap_f.

[procedure] (load-bitmap-from-file file string)

Implements al_load_bitmap_f, with (free-bitmap!) declared as a finalizer.

[procedure] (bitmap-save bitmap string)

Implements al_save_bitmap.

[procedure] (bitmap-save-to-file bitmap file string)

Implements al_save_bitmap_f.