allegro_sys/
bitmap_draw.rs

1// Copyright (c) 2014 by SiegeLord
2//
3// All rights reserved. Distributed under ZLib. For full terms see the file LICENSE.
4
5use crate::bitmap::*;
6use crate::color::*;
7
8use libc::*;
9
10pub const ALLEGRO_FLIP_HORIZONTAL: u32 = 1;
11pub const ALLEGRO_FLIP_VERTICAL: u32 = 2;
12
13unsafe extern "C" {
14	pub fn al_draw_bitmap(bitmap: *mut ALLEGRO_BITMAP, dx: c_float, dy: c_float, flags: c_int);
15	pub fn al_draw_bitmap_region(
16		bitmap: *mut ALLEGRO_BITMAP, sx: c_float, sy: c_float, sw: c_float, sh: c_float,
17		dx: c_float, dy: c_float, flags: c_int,
18	);
19	pub fn al_draw_scaled_bitmap(
20		bitmap: *mut ALLEGRO_BITMAP, sx: c_float, sy: c_float, sw: c_float, sh: c_float,
21		dx: c_float, dy: c_float, dw: c_float, dh: c_float, flags: c_int,
22	);
23	pub fn al_draw_rotated_bitmap(
24		bitmap: *mut ALLEGRO_BITMAP, cx: c_float, cy: c_float, dx: c_float, dy: c_float,
25		angle: c_float, flags: c_int,
26	);
27	pub fn al_draw_scaled_rotated_bitmap(
28		bitmap: *mut ALLEGRO_BITMAP, cx: c_float, cy: c_float, dx: c_float, dy: c_float,
29		xscale: c_float, yscale: c_float, angle: c_float, flags: c_int,
30	);
31	pub fn al_draw_tinted_bitmap(
32		bitmap: *mut ALLEGRO_BITMAP, tint: ALLEGRO_COLOR, dx: c_float, dy: c_float, flags: c_int,
33	);
34	pub fn al_draw_tinted_bitmap_region(
35		bitmap: *mut ALLEGRO_BITMAP, tint: ALLEGRO_COLOR, sx: c_float, sy: c_float, sw: c_float,
36		sh: c_float, dx: c_float, dy: c_float, flags: c_int,
37	);
38	pub fn al_draw_tinted_scaled_bitmap(
39		bitmap: *mut ALLEGRO_BITMAP, tint: ALLEGRO_COLOR, sx: c_float, sy: c_float, sw: c_float,
40		sh: c_float, dx: c_float, dy: c_float, dw: c_float, dh: c_float, flags: c_int,
41	);
42	pub fn al_draw_tinted_rotated_bitmap(
43		bitmap: *mut ALLEGRO_BITMAP, tint: ALLEGRO_COLOR, cx: c_float, cy: c_float, dx: c_float,
44		dy: c_float, angle: c_float, flags: c_int,
45	);
46	pub fn al_draw_tinted_scaled_rotated_bitmap(
47		bitmap: *mut ALLEGRO_BITMAP, tint: ALLEGRO_COLOR, cx: c_float, cy: c_float, dx: c_float,
48		dy: c_float, xscale: c_float, yscale: c_float, angle: c_float, flags: c_int,
49	);
50	pub fn al_draw_tinted_scaled_rotated_bitmap_region(
51		bitmap: *mut ALLEGRO_BITMAP, sx: c_float, sy: c_float, sw: c_float, sh: c_float,
52		tint: ALLEGRO_COLOR, cx: c_float, cy: c_float, dx: c_float, dy: c_float, xscale: c_float,
53		yscale: c_float, angle: c_float, flags: c_int,
54	);
55}