# Function arduboy_rust::prelude::sprites::draw_erase

source ·

    pub fn draw_erase(x: i16, y: i16, bitmap: *const u8, frame: u8)

Expand description

“Erase” a sprite.

Parameters

- x,y The coordinates of the top left pixel location.
- bitmap A pointer to the array containing the image frames.
- frame The frame number of the image to erase.

The data from the specified frame in the array is used to erase a sprite. To “erase” a sprite, bits set to 1 in the frame will set the corresponding pixel in the buffer to 0. Frame bits set to 0 will remain unchanged in the buffer.

     image  before  after  (# = 1, - = 0)

     -----  -----   -----
     --#--  -----   -----
     ##-##  -----   -----
     --#--  -----   -----
     -----  -----   -----

     image  before  after

     -----  #####   #####
     --#--  #####   ##-##
     ##-##  #####   --#--
     --#--  #####   ##-##
     -----  #####   #####