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.
Dependents: TouchScreenGUIDemo
Widgets/BitmapWidget.h
- Committer:
- duncanFrance
- Date:
- 2016-05-22
- Revision:
- 16:e9a771ecfdbe
- Parent:
- 14:e6515b19f5a0
File content as of revision 16:e9a771ecfdbe:
#ifndef SIMPLEGUI_BITMAP_WIDGET_H
#define SIMPLEGUI_BITMAP_WIDGET_H
#include "Widget.h"
class BitmapWidget : public Widget {
public:
BitmapWidget(GraphicsContext *context);
BitmapWidget(GraphicsContext *context, bool monochrome);
// Ccncrete methods for this class
void setBitmap(unsigned char const * bitmap, int width, int height);
// Set to draw the bitmap in monochrome
void setMonochrome(bool enabled);
bool isMonochrome();
// Override to accommodate auto-resizing (yes, yes. sorry)
virtual void setBorder(int width, uint16_t color);
protected:
virtual void _draw();
unsigned char* _bitmap;
bool _monochrome;
int _bitmapWidth, _bitmapHeight;
};
#endif