Issue #340, add U8G2_BITMAP to access Bitmap device from C++
This commit is contained in:
parent
4bfdfb5492
commit
c7ac9a7818
|
@ -6313,5 +6313,17 @@ class U8G2_MAX7219_32X8_F_2ND_4W_HW_SPI : public U8G2 {
|
|||
|
||||
#endif // U8X8_USE_PINS
|
||||
|
||||
class U8G2_BITMAP : public U8G2 {
|
||||
public: U8G2_BITMAP(uint16_t pixel_width, uint16_t pixel_height, const u8g2_cb_t *rotation) {
|
||||
u8g2_SetupBitmap(getU8g2(), rotation, pixel_width, pixel_height);
|
||||
}
|
||||
|
||||
// This completely resets various settings, such as the
|
||||
// font, so be sure to re-initialize things
|
||||
void changeSize(uint16_t pixel_width, uint16_t pixel_height) {
|
||||
u8g2_SetupBitmap(getU8g2(), getU8g2()->cb, pixel_width, pixel_height);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _U8G2LIB_HH */
|
||||
|
||||
|
|
Loading…
Reference in New Issue