Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SimpleGUI by
Widgets/BitmapWidget.cpp
- Committer:
- duncanFrance
- Date:
- 2016-03-27
- Revision:
- 4:27546fb8b670
- Child:
- 7:303850a4b30c
File content as of revision 4:27546fb8b670:
#include "BitmapWidget.h"
BitmapWidget::BitmapWidget(GraphicsDisplay* display) : Widget(display), _monochrome(false)
{
}
void BitmapWidget::setMonochrome(bool enabled)
{
_monochrome = enabled;
}
bool BitmapWidget::isMonochrome()
{
return _monochrome;
}
void BitmapWidget::setBitmap(unsigned char* bitmap)
{
_bitmap = bitmap;
}
void BitmapWidget::draw()
{
if(_monochrome) {
_display->Bitmap_FG_BG(_x, _y, _width, _height, _bitmap);
} else {
_display->Bitmap(_x, _y, _width, _height, _bitmap);
}
}
