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
BitmapWidget.h
00001 #ifndef SIMPLEGUI_BITMAP_WIDGET_H 00002 #define SIMPLEGUI_BITMAP_WIDGET_H 00003 00004 #include "Widget.h" 00005 00006 class BitmapWidget : public Widget { 00007 00008 public: 00009 00010 BitmapWidget(GraphicsContext *context); 00011 BitmapWidget(GraphicsContext *context, bool monochrome); 00012 00013 // Ccncrete methods for this class 00014 void setBitmap(unsigned char const * bitmap, int width, int height); 00015 00016 // Set to draw the bitmap in monochrome 00017 void setMonochrome(bool enabled); 00018 bool isMonochrome(); 00019 00020 // Override to accommodate auto-resizing (yes, yes. sorry) 00021 virtual void setBorder(int width, uint16_t color); 00022 00023 protected: 00024 00025 virtual void _draw(); 00026 00027 unsigned char* _bitmap; 00028 bool _monochrome; 00029 int _bitmapWidth, _bitmapHeight; 00030 }; 00031 00032 #endif
Generated on Tue Jul 12 2022 22:27:14 by
