/** * @filename : epdpaint.h * @brief : Header file for epdpaint.cpp * @author : Yehui from Waveshare * * Copyright (C) Waveshare July 28 2017 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documnetation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef EPDPAINT_H #define EPDPAINT_H // Display orientation #define ROTATE_0 0 #define ROTATE_90 1 #define ROTATE_180 2 #define ROTATE_270 3 // Color inverse. 1 or 0 = set or reset a bit if set a colored pixel #define IF_INVERT_COLOR 1 #include "fonts.h" #include "renderer.h" class Paint : public Renderer { public: Paint(int16_t width, int16_t height); void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); void drawFastVLine(int16_t x, int16_t y, int16_t w, uint16_t color); void drawPixel(int16_t x, int16_t y, uint16_t color); void DrawAbsolutePixel(int x, int y, int16_t color); void DisplayOnff(int8_t on); void DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font); void Begin(int16_t p1,int16_t p2,int16_t p3); void Updateframe(); }; #endif /* END OF FILE */