GFXcanvasSerialDemo.h 2.4 KB

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