Graphics::drawBitmap

This is a legacy function, you should prefer the brand new gb.display.drawImage function ;)

Description

void Graphics::drawBitmap( int8_t x , int8_t y , const uint8_t* bitmap [, uint8_t rotation , uint8_t flip ] )

Graphics::drawBitmap draws a monochrome bitmap to the display/image/whatever. Optionally you can also rotate and flip it.

Parameters

  • int8_t x: x-coordinate of the bitmap
  • int8_t y: y-coordinate of the bitmap
  • const uint8_t* bitmap: the bitmap itself
  • uint8_t rotation (optional): rotation of the bitmap
  • uint8_t flip (optional): in which direction(s) to flip the bitmap

Returns

none

Example

#include <Gamebuino-Meta.h>

// define a checkerbox bitmap const uint8_t bitmap[] = { 8, 8, 0b01010101, 0b10101010, 0b01010101, 0b10101010, 0b01010101, 0b10101010, 0b01010101, 0b10101010, };

void setup() { gb.begin(); }

void loop() { while(!gb.update()); gb.display.clear();

// draw the checkered bitmap in yellow gb.display.setColor(YELLOW); gb.display.drawBitmap(0, 0, bitmap); }