diff -r 49e2960d4642 -r 3fd5e0fc075f components/tft/tft.h --- a/components/tft/tft.h Fri Oct 26 21:23:46 2018 +0200 +++ b/components/tft/tft.h Fri Oct 26 22:19:48 2018 +0200 @@ -3,6 +3,7 @@ * @brief High level TFT functions * @author LoBo 04/2017 * @see https://github.com/loboris + * @author M. Broek - removed unused code for this app. */ #ifndef _TFT_H_ @@ -179,21 +180,6 @@ */ void TFT_drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, color_t color); - -/** - * @brief Draw line on screen from (x,y) point at given angle - * Line drawing angle starts at lower right quadrant of the screen and is offseted by - * '_angleOffset' global variable (default: -90 degrees) - * - * @param x horizontal start position - * @param y vertical start position - * @param start start offset from (x,y) - * @param len length of the line - * @param angle line angle in degrees - * @param color line color - */ -void TFT_drawLineByAngle(uint16_t x, uint16_t y, uint16_t start, uint16_t len, uint16_t angle, color_t color); - /** * @brief Fill given rectangular screen region with color * @@ -255,32 +241,6 @@ void TFT_fillWindow(color_t color); /** - * @brief Draw triangle on screen - * - * @param x0 first triangle point x position - * @param y0 first triangle point y position - * @param x0 second triangle point x position - * @param y0 second triangle point y position - * @param x0 third triangle point x position - * @param y0 third triangle point y position - * @param color triangle color - */ -void TFT_drawTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, color_t color); - -/** - * @brief Fill triangular screen region with color - * - * @param x0 first triangle point x position - * @param y0 first triangle point y position - * @param x0 second triangle point x position - * @param y0 second triangle point y position - * @param x0 third triangle point x position - * @param y0 third triangle point y position - * @param color fill color - */ -void TFT_fillTriangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, color_t color); - -/** * @brief Draw circle on screen * * @param x circle center x position @@ -301,73 +261,6 @@ void TFT_fillCircle(int16_t x, int16_t y, int radius, color_t color); /** - * @brief Draw ellipse on screen - * - * @param x0 ellipse center x position - * @param y0 ellipse center x position - * @param rx ellipse horizontal radius - * @param ry ellipse vertical radius - * @param option drawing options, multiple options can be combined - * - * 1 (TFT_ELLIPSE_UPPER_RIGHT) draw upper right corner - * 2 (TFT_ELLIPSE_UPPER_LEFT) draw upper left corner - * 4 (TFT_ELLIPSE_LOWER_LEFT) draw lower left corner - * 8 (TFT_ELLIPSE_LOWER_RIGHT) draw lower right corner - * to draw the whole ellipse use option value 15 (1 | 2 | 4 | 8) - * @param color: circle color - */ -void TFT_drawEllipse(uint16_t x0, uint16_t y0, uint16_t rx, uint16_t ry, color_t color, uint8_t option); - -/** - * @brief Fill elliptical region on screen - * - * @param x0 ellipse center x position - * @param y0 ellipse center x position - * @param rx ellipse horizontal radius - * @param ry ellipse vertical radius - * @param option drawing options, multiple options can be combined - * - * 1 (TFT_ELLIPSE_UPPER_RIGHT) fill upper right corner - * 2 (TFT_ELLIPSE_UPPER_LEFT) fill upper left corner - * 4 (TFT_ELLIPSE_LOWER_LEFT) fill lower left corner - * 8 (TFT_ELLIPSE_LOWER_RIGHT) fill lower right corner - * to fill the whole ellipse use option value 15 (1 | 2 | 4 | 8) - * @param color fill color - */ -void TFT_fillEllipse(uint16_t x0, uint16_t y0, uint16_t rx, uint16_t ry, color_t color, uint8_t option); - - -/** - * @brief Draw circle arc on screen - * Arc drawing angle starts at lower right quadrant of the screen and is offseted by - * '_angleOffset' global variable (default: -90 degrees) - * - * @param cx arc center X position - * @param cy arc center Y position - * @param th thickness of the drawn arc - * @param ry arc vertical radius - * @param start arc start angle in degrees - * @param end arc end angle in degrees - * @param color arc outline color - * @param fillcolor arc fill color - */ -void TFT_drawArc(uint16_t cx, uint16_t cy, uint16_t r, uint16_t th, float start, float end, color_t color, color_t fillcolor); - -/** - * @brief Draw polygon on screen - * - * @param cx polygon center X position - * @param cy arc center Y position - * @param sides number of polygon sides; MAX_POLIGON_SIDES ~ MAX_POLIGON_SIDES (3 ~ 60) - * @param diameter diameter of the circle inside which the polygon is drawn - * @param color polygon outline color - * @param fill polygon fill color; if same as color, polygon is not filled - * @param deg polygon rotation angle; 0 ~ 360 - * @param th thickness of the polygon outline - */ -void TFT_drawPolygon(int cx, int cy, int sides, int diameter, color_t color, color_t fill, int deg, uint8_t th); - -/** * @brief Set the font used for writing the text to display. * * ------------------------------------------------------------------------------------ @@ -470,27 +363,12 @@ void TFT_setRotation(uint8_t rot); /** - * @brief Set inverted/normal colors - * - * @param mode 0 or 1; use defined constants: INVERT_ON or INVERT_OFF - */ -void TFT_invertDisplay(const uint8_t mode); - -/** * @brief Select gamma curve * @param gm gama curve, values 0~3 */ void TFT_setGammaCurve(uint8_t gm); /** - * @brief Compare two color structures - * @return 0 if equal, 1 if not equal - * - * @param c1, c2 colors to be compared - */ -int TFT_compare_colors(color_t c1, color_t c2); - -/** * @brief returns the string width in pixels. Useful for positions strings on the screen. * @return The string width. */ @@ -506,19 +384,6 @@ void TFT_clearStringRect(int x, int y, char *str); /** - * @brief Converts the components of a color, as specified by the HSB model, - * to an equivalent set of values for the default RGB model. - * - * The color structure that is returned by HSBtoRGB encodes the value of a color as R, G & B component - * - * @param _hue any number, the floor of this number is subtracted from it to create a fraction between 0 and 1. - * This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model. - * @param _sat 0 ~ 1.0 - * @param _brightness 0 ~ 1.0 - */ -color_t HSBtoRGB(float _hue, float _sat, float _brightness); - -/** * @brief Get the touch panel coordinates. * The coordinates are adjusted to screen orientation if raw=0 * @@ -530,22 +395,4 @@ */ int TFT_read_touch(int *x, int* y, uint8_t raw); - -/** - * @brief Compile font c source file to .fnt file - * which can be used in TFT_setFont() function to select external font - * Created file have the same name as source file and extension .fnt - * - * @param fontfile pointer to c source font file name; must have .c extension - * @param dbg if set to 1, prints debug information - * - * @return 0 on success, err no on error - */ -int compile_font_file(char *fontfile, uint8_t dbg); - -/** - * @brief Get all font's characters to buffer - */ -void getFontCharacters(uint8_t *buf); - #endif