38
+ − 1 ///////////////////////////////////////////////////////////////////////////////
+ − 2 /// -*- coding: UTF-8 -*-
+ − 3 ///
+ − 4 /// \file Discovery/Inc/gfx.h
+ − 5 /// \brief Header file for common GFX files
+ − 6 /// \author heinrichs weikamp gmbh
+ − 7 /// \date 07-April-2014
+ − 8 ///
+ − 9 /// $Id$
+ − 10 ///////////////////////////////////////////////////////////////////////////////
+ − 11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
+ − 12 ///
+ − 13 /// This program is free software: you can redistribute it and/or modify
+ − 14 /// it under the terms of the GNU General Public License as published by
+ − 15 /// the Free Software Foundation, either version 3 of the License, or
+ − 16 /// (at your option) any later version.
+ − 17 ///
+ − 18 /// This program is distributed in the hope that it will be useful,
+ − 19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
+ − 20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ − 21 /// GNU General Public License for more details.
+ − 22 ///
+ − 23 /// You should have received a copy of the GNU General Public License
+ − 24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
+ − 25 //////////////////////////////////////////////////////////////////////////////
+ − 26
+ − 27 /* Define to prevent recursive inclusion -------------------------------------*/
+ − 28 #ifndef GFX_H
+ − 29 #define GFX_H
+ − 30
+ − 31 /* Includes ------------------------------------------------------------------*/
+ − 32
+ − 33 #include <stdint.h>
+ − 34
+ − 35 /* Exported types ------------------------------------------------------------*/
+ − 36
+ − 37 typedef struct {
+ − 38 const uint8_t *data;
+ − 39 uint16_t width;
+ − 40 uint16_t height;
+ − 41 } tImage;
+ − 42
+ − 43 typedef struct {
+ − 44 long int code;
+ − 45 const tImage *image;
+ − 46 } tChar;
+ − 47
+ − 48 typedef struct {
+ − 49 uint32_t length;
+ − 50 const tChar *chars;
+ − 51 uint8_t spacesize;
+ − 52 uint8_t spacesize2Monospaced;
+ − 53 uint8_t height;
+ − 54 } tFont;
+ − 55
+ − 56 typedef struct {
+ − 57 uint32_t x;
+ − 58 uint32_t y;
+ − 59 } point_t;
+ − 60
+ − 61 typedef struct {
+ − 62 int16_t x;
+ − 63 int16_t y;
+ − 64 } int16_Point_t;
+ − 65
+ − 66 typedef union {
+ − 67 uint32_t i[6];
+ − 68 point_t p[3];
+ − 69 } bezier_t;
+ − 70
+ − 71 typedef struct {
+ − 72 const bezier_t* data;
+ − 73 uint8_t datalen;
+ − 74 } path_t;
+ − 75
+ − 76 #endif // GFX_H