al_draw_bitmap
void al_draw_bitmap(ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags)
Introduced in 5.0.0
Draws an unscaled, unrotated bitmap at the given position to the current target bitmap (see al_set_target_bitmap).
flags
can be a combination of:
- ALLEGRO_FLIP_HORIZONTAL - flip the bitmap about the y-axis
- ALLEGRO_FLIP_VERTICAL - flip the bitmap about the x-axis
Note: The current target bitmap must be a different bitmap. Drawing a bitmap to itself (or to a sub-bitmap of itself) or drawing a sub-bitmap to its parent (or another sub-bitmap of its parent) are not currently supported. To copy part of a bitmap into the same bitmap simply use a temporary bitmap instead.
Note: The backbuffer (or a sub-bitmap thereof) can not be transformed, blended or tinted. If you need to draw the backbuffer draw it to a temporary bitmap first with no active transformation (except translation). Blending and tinting settings/parameters will be ignored. This does not apply when drawing into a memory bitmap.
See also: al_draw_bitmap_region, al_draw_scaled_bitmap, al_draw_rotated_bitmap, al_draw_scaled_rotated_bitmap
Examples: ex_bitmap, ex_blend, ex_blend2, ex_blend_bench, ex_blend_test, ex_blit, ex_clip, ex_curl, ex_draw, ex_expose, ex_font, ex_fs_resize, ex_fs_window, ex_iphone, ex_lines, ex_lockbitmap, ex_logo, ex_mixer_pp, ex_mouse, ex_mouse_events, ex_nodisplay, ex_noframe, ex_opengl_pixel_shader, ex_physfs, ex_pixelformat, ex_prim, ex_rotate, ex_scale, ex_subbitmap, ex_threads2, ex_transform
Most helpful discussions:
- Mouse bitmap (1)
- Locking bitmaps is very slow (1)
- [A5] event queue & timing problems (1)
- Problem toggling between Window and Fullscreen (1)
- [A5] Copying a bitmap from a transformed screen (1)
- Drawing a bitmap in a class (1)
- images dont load [a5] (1)
- Section of Code Lagging the Program
- Screen flipping varying speeds
- Problem with al_creat_bitmap
Other recent discussions:
- Mouse Click Inside Timer Function
- Need some help with shaders
- Convert *bitmap to char buffer
- al_load_bitmap question
- Mouse Lag / Not Keyboard
- A shader that sets transparancy
- My second game, space invader simplified
- Vivace extra points. Its there a better way of doing this one.
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- Thread locks too soon