Trait allegro::bitmap_like::BitmapLike [−][src]
A trait implemented by types that behave like bitmaps.
Required methods
fn get_allegro_bitmap(&self) -> *mut ALLEGRO_BITMAP
[src]
fn create_sub_bitmap(
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>
[src]
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>
Creates a sub-bitmap of the current bitmap. Note that the parent bitmap will panic upon destruction if any strong references to its sub-bitmaps are held at that time.
Provided methods
fn get_width(&self) -> i32
[src]
fn get_height(&self) -> i32
[src]
fn get_format(&self) -> PixelFormat
[src]
fn get_flags(&self) -> BitmapFlags
[src]
fn get_pixel(&self, x: i32, y: i32) -> Color
[src]
fn convert_mask_to_alpha(&self, mask_color: Color)
[src]
fn is_compatible_bitmap(&self) -> bool
[src]
Returns if this bitmap is compatible with the current display. This comes into play when you have multiple displays in a single thread, and have created bitmaps for different displays. A bitmap created for one display may or may not be compatible with the other display. If the bitmap is not compatible, drawing it will be slow.
Implementors
impl BitmapLike for Bitmap
[src]
fn get_allegro_bitmap(&self) -> *mut ALLEGRO_BITMAP
[src]
fn create_sub_bitmap(
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>
[src]
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>
impl BitmapLike for SubBitmap
[src]
fn get_allegro_bitmap(&self) -> *mut ALLEGRO_BITMAP
[src]
fn create_sub_bitmap(
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>
[src]
&self,
x: i32,
y: i32,
w: i32,
h: i32
) -> Result<Weak<SubBitmap>, ()>