1al_draw_rotated_bitmap(3)                            al_draw_rotated_bitmap(3)
2
3
4

NAME

6       al_draw_rotated_bitmap - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              void al_draw_rotated_bitmap(ALLEGRO_BITMAP *bitmap,
12                 float cx, float cy, float dx, float dy, float angle, int flags)
13

DESCRIPTION

15       Draws  a rotated version of the given bitmap to the target bitmap.  The
16       bitmap is rotated by `angle' radians clockwise.
17
18       The point at cx/cy relative to the upper left corner of the bitmap will
19       be  drawn  at  dx/dy  and  the bitmap is rotated around this point.  If
20       cx,cy is 0,0 the bitmap will rotate around its upper left corner.
21
22       • cx - center x (relative to the bitmap)
23
24       • cy - center y (relative to the bitmap)
25
26       • dx - destination x
27
28       • dy - destination y
29
30       • angle - angle by which to rotate (radians)
31
32       • flags - same as for al_draw_bitmap(3)
33
34       Example
35
36              float w = al_get_bitmap_width(bitmap);
37              float h = al_get_bitmap_height(bitmap);
38              al_draw_rotated_bitmap(bitmap, w / 2, h / 2, x, y, ALLEGRO_PI / 2, 0);
39
40       The above code draws the bitmap centered on  x/y  and  rotates  it  90°
41       clockwise.
42
43       See  al_draw_bitmap(3)  for a note on restrictions on which bitmaps can
44       be drawn where.
45

SEE ALSO

47       al_draw_bitmap(3), al_draw_bitmap_region(3),  al_draw_scaled_bitmap(3),
48       al_draw_scaled_rotated_bitmap(3)
49
50
51
52Allegro reference manual                             al_draw_rotated_bitmap(3)
Impressum