chickadee » allegro » bitmap

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.

Enums

bitmap-flag

bitmap-flag->int bitmap-flagprocedure

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
int->bitmap-flag integerprocedure

blend-operation

blend-operation->int blend-operationprocedure

blend-operation may be one of the following symbols:

  • add
  • source-minus-destination
  • destination-minus-source
int->blend-operation integerprocedure

blending-mode

blending-mode->int blending-modeprocedure

blending-mode may be one of the following symbols:

  • zero
  • one
  • alpha
  • inverse-alpha
int->blending-mode integerprocedure

blitting-flag

blitting-flag->int blitting-flagprocedure

blitting-flag may be one of the following symbols:

  • flip-horizontal
  • flip-vertical
int->blitting-flag integerprocedure

locking-flag

locking-flag->int locking-flagprocedure

locking-flag may be one of the following symbols:

  • read-write
  • read-only
  • write-only
int->locking-flag integerprocedure

pixel-format

pixel-format->int pixel-formatprocedure

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
int->pixel-format integerprocedure

Records

bitmap

bitmaprecord

locked-region

locked-regionrecord
free-locked-region! locked-regionprocedure
locked-region-data locked-regionprocedure
locked-region-format locked-regionprocedure
locked-region-pitch locked-regionprocedure
locked-region-pixel-size locked-regionprocedure

Functions

Bitmap

new-bitmap-format-set! pixel-formatprocedure

Implements al_set_new_bitmap_format.

new-bitmap-formatprocedure

Implements al_get_new_bitmap_flags.

new-bitmap-flags-set! bitmap-flagprocedure

Implements al_set_new_bitmap_flags.

new-bitmap-flagsprocedure

Implements al_get_new_bitmap_flags.

new-bitmap-add-flag bitmap-flagprocedure

Implements al_add_new_bitmap_flag.

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

Implements al_create_bitmap.

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

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

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

Implements al_draw_bitmap.

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

Implements al_draw_bitmap.

(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.

(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.

(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.

(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.

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

Implements al_draw_rotated_bitmap.

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

Implements al_draw_rotated_bitmap.

(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.

(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.

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

Implements al_draw_tinted_bitmap.

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

Implements al_draw_tinted_bitmap.

(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.

(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.

(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.

(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.

(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.

(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.

(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.

(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.

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

Implements al_lock_bitmap.

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

Implements al_lock_bitmap.

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

Implements al_lock_bitmap_region.

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

Implements al_lock_bitmap_region.

bitmap-unlock! bitmapprocedure

Implements al_unlock_bitmap.

unlock-bitmap! bitmapprocedure

Implements al_unlock_bitmap.

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

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

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

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

(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.

(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.

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

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

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

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

(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.

bitmap-width bitmapprocedure

Implements al_get_bitmap_width.

bitmap-height bitmapprocedure

Implements al_get_bitmap_height.

bitmap-format bitmapprocedure

Implements al_get_bitmap_format.

bitmap-flags bitmapprocedure

Implements al_get_bitmap_flags.

bitmap-mask->alpha! bitmap colorprocedure

Implements al_convert_mask_to_alpha.

bitmap-clone* bitmapprocedure

Implements al_clone_bitmap.

bitmap-clone bitmapprocedure

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

bitmap-locked? bitmapprocedure

Implements al_is_bitmap_locked.

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

Implements _al_put_pixel.

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

Implements al_create_sub_bitmap.

(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.

sub-bitmap? bitmapprocedure

Implements al_is_sub_bitmap.

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

Implements al_put_pixel.

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

Implements al_put_blended_pixel.

pixel-size pixel-formatprocedure

Implements al_get_pixel_size.

(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.

(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.

(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.

(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.

map-rgb* r g bprocedure

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

map-rgb r g bprocedure

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

map-rgba* r g b aprocedure

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

map-rgba r g b aprocedure

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

map-rgb-float* r g bprocedure

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

map-rgb-float r g bprocedure

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

map-rgba-float* r g b aprocedure

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

map-rgba-float r g b aprocedure

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

color-unmap-rgb colorprocedure

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

color-unmap-rgba colorprocedure

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

color-unmap-rgb-float colorprocedure

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

color-unmap-rgba-float colorprocedure

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

pixel-format-bits pixel-formatprocedure

Implements al_get_pixel_format_bits.

clipping-rectangleprocedure

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

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

Sets the current clipping rectangle.

blenderprocedure

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

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

Implements al_set_blender.

separate-blenderprocedure

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

(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

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

Implements al_register_bitmap_loader.

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

Implements al_register_bitmap_loader_f.

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

Implements al_register_bitmap_saver.

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

Implements al_register_bitmap_saver_f.

load-bitmap* stringprocedure

Implements al_load_bitmap.

load-bitmap stringprocedure

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

load-bitmap-from-file* file stringprocedure

Implements al_load_bitmap_f.

load-bitmap-from-file file stringprocedure

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

bitmap-save bitmap stringprocedure

Implements al_save_bitmap.

bitmap-save-to-file bitmap file stringprocedure

Implements al_save_bitmap_f.

Contents »