GFXcanvasSerialDemo.h (2408B)
1 #ifndef __GFXcanvasSerialDemo__ 2 #define __GFXcanvasSerialDemo__ 3 #include <Adafruit_GFX.h> 4 5 /**********************************************************************/ 6 /*! 7 @brief Demonstrates using the GFXconvas classes as the backing store 8 for a device driver. 9 */ 10 /**********************************************************************/ 11 class GFXcanvas1SerialDemo : public GFXcanvas1 { 12 public: 13 GFXcanvas1SerialDemo(uint16_t w, uint16_t h); 14 15 /**********************************************************************/ 16 /*! 17 @brief Prints the current contents of the canvas to Serial 18 @param rotated true to print according to the current GFX rotation, 19 false to print to the native rotation of the canvas (or unrotated). 20 */ 21 /**********************************************************************/ 22 void print(bool rotated); 23 }; 24 25 /**********************************************************************/ 26 /*! 27 @brief Demonstrates using the GFXconvas classes as the backing store 28 for a device driver. 29 */ 30 /**********************************************************************/ 31 class GFXcanvas8SerialDemo : public GFXcanvas8 { 32 public: 33 GFXcanvas8SerialDemo(uint16_t w, uint16_t h); 34 35 /**********************************************************************/ 36 /*! 37 @brief Prints the current contents of the canvas to Serial 38 @param rotated true to print according to the current GFX rotation, 39 false to print to the native rotation of the canvas (or unrotated). 40 */ 41 /**********************************************************************/ 42 void print(bool rotated); 43 }; 44 45 /**********************************************************************/ 46 /*! 47 @brief Demonstrates using the GFXconvas classes as the backing store 48 for a device driver. 49 */ 50 /**********************************************************************/ 51 class GFXcanvas16SerialDemo : public GFXcanvas16 { 52 public: 53 GFXcanvas16SerialDemo(uint16_t w, uint16_t h); 54 55 /**********************************************************************/ 56 /*! 57 @brief Prints the current contents of the canvas to Serial 58 @param rotated true to print according to the current GFX rotation, 59 false to print to the native rotation of the canvas (or unrotated). 60 */ 61 /**********************************************************************/ 62 void print(bool rotated); 63 }; 64 65 #endif // __GFXcanvasSerialDemo__