---
name: "al_draw_bitmap"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_draw_bitmap/3alleg5"
---

# al\_draw\_bitmap(3alleg5)

Allegro 5 API

## NAME

al\_draw\_bitmap - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_draw_bitmap(ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags)
  ```

## DESCRIPTION

Draws an unscaled, unrotated bitmap at the given position to the current target bitmap (see al\_set\_target\_bitmap(3alleg5)).

`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(3alleg5), al\_draw\_scaled\_bitmap(3alleg5), al\_draw\_rotated\_bitmap(3alleg5), al\_draw\_scaled\_rotated\_bitmap(3alleg5)
