Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/allegro|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 [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: allegro game]] == allegro This document pertains to bitmap related methods found in the Allegro egg. Please see the main [allegro] wiki page for more information. [[toc:]] == Enums === bitmap-flag <procedure>(bitmap-flag->int bitmap-flag)</procedure> {{bitmap-flag}} may be one of the following symbols: * memory-bitmap * keep-bitmap-format * force-locking * no-preserve-texture * alpha-test * min-linear * mag-linear * mipmap * no-premultiplied-alpha * video-bitmap <procedure>(int->bitmap-flag integer)</procedure> === blend-operation <procedure>(blend-operation->int blend-operation)</procedure> {{blend-operation}} may be one of the following symbols: * add * source-minus-destination * destination-minus-source <procedure>(int->blend-operation integer)</procedure> === blending-mode <procedure>(blending-mode->int blending-mode)</procedure> {{blending-mode}} may be one of the following symbols: * zero * one * alpha * inverse-alpha <procedure>(int->blending-mode integer)</procedure> === blitting-flag <procedure>(blitting-flag->int blitting-flag)</procedure> {{blitting-flag}} may be one of the following symbols: * flip-horizontal * flip-vertical <procedure>(int->blitting-flag integer)</procedure> === locking-flag <procedure>(locking-flag->int locking-flag)</procedure> {{locking-flag}} may be one of the following symbols: * read-write * read-only * write-only <procedure>(int->locking-flag integer)</procedure> === pixel-format <procedure>(pixel-format->int pixel-format)</procedure> {{pixel-format}} may be one of the following symbols: * any * any-no-alpha * any-with-alpha * any-15-no-alpha * any-16-no-alpha * any-16-with-alpha * any-24-no-alpha * any-32-no-alpha * any-32-with-alpha * argb-8888 * rgba-8888 * argb-4444 * rgb-888 * rgb-565 * rgb555 * rgba-5551 * argb-1555 * abgr-8888 * xbgr-8888 * bgr-888 * bgr-565 * bgr-555 * rgbx-8888 * xrgb-8888 * abgr-f32 * abgr-8888-le * rgba-4444 <procedure>(int->pixel-format integer)</procedure> == Records === bitmap <record>bitmap</record> === locked-region <record>locked-region</record> <procedure>(free-locked-region! locked-region)</procedure> <procedure>(locked-region-data locked-region)</procedure> <procedure>(locked-region-format locked-region)</procedure> <procedure>(locked-region-pitch locked-region)</procedure> <procedure>(locked-region-pixel-size locked-region)</procedure> == Functions === Bitmap <procedure>(new-bitmap-format-set! pixel-format)</procedure> Implements al_set_new_bitmap_format. <procedure>(new-bitmap-format)</procedure> Implements al_get_new_bitmap_flags. <procedure>(new-bitmap-flags-set! bitmap-flag)</procedure> Implements al_set_new_bitmap_flags. <procedure>(new-bitmap-flags)</procedure> Implements al_get_new_bitmap_flags. <procedure>(new-bitmap-add-flag bitmap-flag)</procedure> Implements al_add_new_bitmap_flag. <procedure>(make-bitmap* (integer width) (integer height))</procedure> Implements al_create_bitmap. <procedure>(make-bitmap (integer width) (integer height))</procedure> Implements al_create_bitmap, with (free-bitmap!) declared as a finalizer. <procedure>(bitmap-draw bitmap (float dx) (float dy) bitmap-flag)</procedure> Implements al_draw_bitmap. <procedure>(draw-bitmap bitmap (float dx) (float dy) bitmap-flag)</procedure> Implements al_draw_bitmap. <procedure>(bitmap-draw-region bitmap (float sx) (float sy) (float sw) (float sh) (float dx) (float dy) (integer bitmap-flags))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> Implements al_draw_scaled_bitmap. <procedure>(bitmap-draw-rotated bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))</procedure> Implements al_draw_rotated_bitmap. <procedure>(draw-rotated-bitmap bitmap (float cx) (float cy) (float dx) (float dy) (float angle) (integer bitmap-flags))</procedure> 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))</procedure> 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))</procedure> Implements al_draw_scaled_rotated_bitmap. <procedure>(bitmap-draw-tinted (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))</procedure> Implements al_draw_tinted_bitmap. <procedure>(draw-tinted-bitmap (bitmap bmp) (color tint) (float dx) (float dy) (integer bitmap-flags))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> Implements al_draw_tinted_scaled_rotated_bitmap. <procedure>(bitmap-lock*! bitmap pixel-format (integer locking-flag))</procedure> Implements al_lock_bitmap. <procedure>(lock-bitmap*! bitmap pixel-format (integer locking-flag))</procedure> Implements al_lock_bitmap. <procedure>(bitmap-lock-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))</procedure> Implements al_lock_bitmap_region. <procedure>(lock-bitmap-region*! bitmap (integer x) (integer y) (integer width) (integer height) pixel-format (integer locking-flag))</procedure> Implements al_lock_bitmap_region. <procedure>(bitmap-unlock! bitmap)</procedure> Implements al_unlock_bitmap. <procedure>(unlock-bitmap! bitmap)</procedure> Implements al_unlock_bitmap. <procedure>(bitmap-lock! bitmap pixel-format (integer bitmap-flags))</procedure> Implements al_lock_bitmap, with (bitmap-unlock!) and (free-locked-region!) declared as finalizers. <procedure>(lock-bitmap! bitmap pixel-format (integer bitmap-flags))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> Sets the provided color struct to the color value at the given coordinates. <procedure>(bitmap-pixel* (bitmap bmp) (int x) (int y))</procedure> Returns a new color struct of the color value at the given coordinates. <procedure>(bitmap-pixel (bitmap bmp) (int x) (int y))</procedure> Returns a new color struct of the color value at the given coordinates, with (free-color!) declared as a finalizer. <procedure>(bitmap-width bitmap)</procedure> Implements al_get_bitmap_width. <procedure>(bitmap-height bitmap)</procedure> Implements al_get_bitmap_height. <procedure>(bitmap-format bitmap)</procedure> Implements al_get_bitmap_format. <procedure>(bitmap-flags bitmap)</procedure> Implements al_get_bitmap_flags. <procedure>(bitmap-mask->alpha! bitmap color)</procedure> Implements al_convert_mask_to_alpha. <procedure>(bitmap-clone* bitmap)</procedure> Implements al_clone_bitmap. <procedure>(bitmap-clone bitmap)</procedure> Implements al_clone_bitmap, with (free-bitmap!) declared as a finalizer. <procedure>(bitmap-locked? bitmap)</procedure> Implements al_is_bitmap_locked. <procedure>(bitmap-put-pixel! bitmap (integer x) (integer y) (color c))</procedure> Implements _al_put_pixel. <procedure>(make-sub-bitmap* bitmap (integer x) (integer y) (integer width) (integer height))</procedure> Implements al_create_sub_bitmap. <procedure>(make-sub-bitmap bitmap (integer x) (integer y) (integer width) (integer height))</procedure> Implements al_create_sub_bitmap, with (free-bitmap!) declared as a finalizer. <procedure>(sub-bitmap? bitmap)</procedure> Implements al_is_sub_bitmap. <procedure>(put-pixel (integer x) (integer y) (color c))</procedure> Implements al_put_pixel. <procedure>(put-blended-pixel (integer x) (integer y) (color c))</procedure> Implements al_put_blended_pixel. <procedure>(pixel-size pixel-format)</procedure> Implements al_get_pixel_size. <procedure>(color-map-rgb! (color c) (unsigned-byte r) (unsigned-byte g) (unsigned-byte b))</procedure> 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))</procedure> 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))</procedure> 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))</procedure> Maps rgba values onto the provided color struct, implementing al_map_rgba_f. <procedure>(map-rgb* r g b)</procedure> Returns a new color struct mapped to the given rgb values. <procedure>(map-rgb r g b)</procedure> 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)</procedure> Prodcues a new color struct mapped to the given rgba values. <procedure>(map-rgba r g b a)</procedure> 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)</procedure> Returns a new color struct mapped to the given rgb values. <procedure>(map-rgb-float r g b)</procedure> 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)</procedure> Returns a new color struct mapped to the given rgba values. <procedure>(map-rgba-float r g b a)</procedure> Returns a new color struct mapped to the given rgba values, with (free-color!) declared as a finalizer. <procedure>(color-unmap-rgb color)</procedure> Returns a 3-element list of the rgb values representing a given color struct. <procedure>(color-unmap-rgba color)</procedure> Returns a 4-element list of the rgba values representing a given color struct. <procedure>(color-unmap-rgb-float color)</procedure> Returns a 3-element list of the rgb values representing a given color struct. <procedure>(color-unmap-rgba-float color)</procedure> Returns a 4-element list of the rgb values representing a given color struct. <procedure>(pixel-format-bits pixel-format)</procedure> Implements al_get_pixel_format_bits. <procedure>(clipping-rectangle)</procedure> 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))</procedure> Sets the current clipping rectangle. <procedure>(blender)</procedure> 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))</procedure> Implements al_set_blender. <procedure>(separate-blender)</procedure> 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))</procedure> Implements al_set_separate_blender. === Bitmap I/O <procedure>(register-bitmap-loader (string extension) (function bitmap ((const c-string))))</procedure> Implements al_register_bitmap_loader. <procedure>(register-bitmap-file-loader (string extension) (function bitmap (file)))</procedure> Implements al_register_bitmap_loader_f. <procedure>(register-bitmap-saver (string extension) ((function bool ((const c-string) bitmap)) saver))</procedure> Implements al_register_bitmap_saver. <procedure>(register-bitmap-file-saver (string extension) ((function bool (file bitmap)) saver))</procedure> Implements al_register_bitmap_saver_f. <procedure>(load-bitmap* string)</procedure> Implements al_load_bitmap. <procedure>(load-bitmap string)</procedure> Implements al_load_bitmap, with (free-bitmap!) declared as a finalizer. <procedure>(load-bitmap-from-file* file string)</procedure> Implements al_load_bitmap_f. <procedure>(load-bitmap-from-file file string)</procedure> Implements al_load_bitmap_f, with (free-bitmap!) declared as a finalizer. <procedure>(bitmap-save bitmap string)</procedure> Implements al_save_bitmap. <procedure>(bitmap-save-to-file bitmap file string)</procedure> Implements al_save_bitmap_f.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 10 to 11?