Trait playdate_graphics::bitmap::api::Api
source · pub trait Api {
Show 16 methods
// Provided methods
fn new_bitmap(
&self
) -> unsafe extern "C" fn(width: c_int, height: c_int, bgcolor: LCDColor) -> *mut LCDBitmap { ... }
fn free_bitmap(&self) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) { ... }
fn load_bitmap(
&self
) -> unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmap { ... }
fn copy_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap { ... }
fn load_into_bitmap(
&self
) -> unsafe extern "C" fn(path: *const c_char, bitmap: *mut LCDBitmap, out_err: *mut *const c_char) { ... }
fn get_bitmap_data(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, width: *mut c_int, height: *mut c_int, row_bytes: *mut c_int, mask: *mut *mut u8, data: *mut *mut u8) { ... }
fn clear_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, bgcolor: LCDColor) { ... }
fn rotated_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, rotation: c_float, x_scale: c_float, y_scale: c_float, allocedSize: *mut c_int) -> *mut LCDBitmap { ... }
fn set_bitmap_mask(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, mask: *mut LCDBitmap) -> c_int { ... }
fn get_bitmap_mask(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap { ... }
fn draw_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, flip: LCDBitmapFlip) { ... }
fn tile_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, width: c_int, height: c_int, flip: LCDBitmapFlip) { ... }
fn draw_rotated_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, rotation: c_float, center_x: c_float, center_y: c_float, x_scale: c_float, y_scale: c_float) { ... }
fn draw_scaled_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, x_scale: c_float, y_scale: c_float) { ... }
fn check_mask_collision(
&self
) -> unsafe extern "C" fn(bitmap1: *mut LCDBitmap, x1: c_int, y1: c_int, flip1: LCDBitmapFlip, bitmap2: *mut LCDBitmap, x2: c_int, y2: c_int, flip2: LCDBitmapFlip, rect: LCDRect) -> c_int { ... }
fn set_color_to_pattern(
&self
) -> unsafe extern "C" fn(color: *mut LCDColor, bitmap: *mut LCDBitmap, x: c_int, y: c_int) { ... }
}Expand description
End-point with methods about ops over bitmap.
Provided Methods§
sourcefn new_bitmap(
&self
) -> unsafe extern "C" fn(width: c_int, height: c_int, bgcolor: LCDColor) -> *mut LCDBitmap
fn new_bitmap( &self ) -> unsafe extern "C" fn(width: c_int, height: c_int, bgcolor: LCDColor) -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::newBitmap
sourcefn free_bitmap(&self) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap)
fn free_bitmap(&self) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap)
Equivalent to sys::ffi::playdate_graphics::freeBitmap
sourcefn load_bitmap(
&self
) -> unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmap
fn load_bitmap( &self ) -> unsafe extern "C" fn(path: *const c_char, outerr: *mut *const c_char) -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::loadBitmap
sourcefn copy_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap
fn copy_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::copyBitmap
sourcefn load_into_bitmap(
&self
) -> unsafe extern "C" fn(path: *const c_char, bitmap: *mut LCDBitmap, out_err: *mut *const c_char)
fn load_into_bitmap( &self ) -> unsafe extern "C" fn(path: *const c_char, bitmap: *mut LCDBitmap, out_err: *mut *const c_char)
Equivalent to sys::ffi::playdate_graphics::loadIntoBitmap
sourcefn get_bitmap_data(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, width: *mut c_int, height: *mut c_int, row_bytes: *mut c_int, mask: *mut *mut u8, data: *mut *mut u8)
fn get_bitmap_data( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, width: *mut c_int, height: *mut c_int, row_bytes: *mut c_int, mask: *mut *mut u8, data: *mut *mut u8)
Equivalent to sys::ffi::playdate_graphics::getBitmapData
sourcefn clear_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, bgcolor: LCDColor)
fn clear_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, bgcolor: LCDColor)
Equivalent to sys::ffi::playdate_graphics::clearBitmap
sourcefn rotated_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, rotation: c_float, x_scale: c_float, y_scale: c_float, allocedSize: *mut c_int) -> *mut LCDBitmap
fn rotated_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, rotation: c_float, x_scale: c_float, y_scale: c_float, allocedSize: *mut c_int) -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::rotatedBitmap
sourcefn set_bitmap_mask(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, mask: *mut LCDBitmap) -> c_int
fn set_bitmap_mask( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, mask: *mut LCDBitmap) -> c_int
Equivalent to sys::ffi::playdate_graphics::setBitmapMask
sourcefn get_bitmap_mask(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap
fn get_bitmap_mask( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap) -> *mut LCDBitmap
Equivalent to sys::ffi::playdate_graphics::getBitmapMask
sourcefn draw_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, flip: LCDBitmapFlip)
fn draw_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, flip: LCDBitmapFlip)
Equivalent to sys::ffi::playdate_graphics::drawBitmap
sourcefn tile_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, width: c_int, height: c_int, flip: LCDBitmapFlip)
fn tile_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, width: c_int, height: c_int, flip: LCDBitmapFlip)
Equivalent to sys::ffi::playdate_graphics::tileBitmap
sourcefn draw_rotated_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, rotation: c_float, center_x: c_float, center_y: c_float, x_scale: c_float, y_scale: c_float)
fn draw_rotated_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, rotation: c_float, center_x: c_float, center_y: c_float, x_scale: c_float, y_scale: c_float)
Equivalent to sys::ffi::playdate_graphics::drawRotatedBitmap
sourcefn draw_scaled_bitmap(
&self
) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, x_scale: c_float, y_scale: c_float)
fn draw_scaled_bitmap( &self ) -> unsafe extern "C" fn(bitmap: *mut LCDBitmap, x: c_int, y: c_int, x_scale: c_float, y_scale: c_float)
Equivalent to sys::ffi::playdate_graphics::drawScaledBitmap
sourcefn check_mask_collision(
&self
) -> unsafe extern "C" fn(bitmap1: *mut LCDBitmap, x1: c_int, y1: c_int, flip1: LCDBitmapFlip, bitmap2: *mut LCDBitmap, x2: c_int, y2: c_int, flip2: LCDBitmapFlip, rect: LCDRect) -> c_int
fn check_mask_collision( &self ) -> unsafe extern "C" fn(bitmap1: *mut LCDBitmap, x1: c_int, y1: c_int, flip1: LCDBitmapFlip, bitmap2: *mut LCDBitmap, x2: c_int, y2: c_int, flip2: LCDBitmapFlip, rect: LCDRect) -> c_int
Equivalent to sys::ffi::playdate_graphics::checkMaskCollision
sourcefn set_color_to_pattern(
&self
) -> unsafe extern "C" fn(color: *mut LCDColor, bitmap: *mut LCDBitmap, x: c_int, y: c_int)
fn set_color_to_pattern( &self ) -> unsafe extern "C" fn(color: *mut LCDColor, bitmap: *mut LCDBitmap, x: c_int, y: c_int)
Equivalent to sys::ffi::playdate_graphics::setColorToPattern