pyrocommander
Dependencies: Fonts LCD_DISCO_F746NG TS_DISCO_F746NG debug mbed
FontX/FontX.h@1:e46a729c44db, 2016-03-13 (annotated)
- Committer:
- rondekoster
- Date:
- Sun Mar 13 09:25:53 2016 +0000
- Revision:
- 1:e46a729c44db
pyrocommander
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rondekoster | 1:e46a729c44db | 1 | #ifndef __FontX_h |
rondekoster | 1:e46a729c44db | 2 | #define __FontX_h |
rondekoster | 1:e46a729c44db | 3 | |
rondekoster | 1:e46a729c44db | 4 | #include "mbed.h" |
rondekoster | 1:e46a729c44db | 5 | |
rondekoster | 1:e46a729c44db | 6 | #define uint_8 unsigned char |
rondekoster | 1:e46a729c44db | 7 | #define int8 char |
rondekoster | 1:e46a729c44db | 8 | #define int16 short |
rondekoster | 1:e46a729c44db | 9 | #define int32 long |
rondekoster | 1:e46a729c44db | 10 | |
rondekoster | 1:e46a729c44db | 11 | typedef struct |
rondekoster | 1:e46a729c44db | 12 | { |
rondekoster | 1:e46a729c44db | 13 | unsigned int16 Charwidth; |
rondekoster | 1:e46a729c44db | 14 | unsigned int16 Charheight; |
rondekoster | 1:e46a729c44db | 15 | unsigned int32 Offset; |
rondekoster | 1:e46a729c44db | 16 | |
rondekoster | 1:e46a729c44db | 17 | } FONT_CHAR_INFO; |
rondekoster | 1:e46a729c44db | 18 | |
rondekoster | 1:e46a729c44db | 19 | typedef struct |
rondekoster | 1:e46a729c44db | 20 | { |
rondekoster | 1:e46a729c44db | 21 | char StartCharacter; |
rondekoster | 1:e46a729c44db | 22 | char EndCharacter; |
rondekoster | 1:e46a729c44db | 23 | const FONT_CHAR_INFO *Descriptors; |
rondekoster | 1:e46a729c44db | 24 | const unsigned int8 *Bitmaps; |
rondekoster | 1:e46a729c44db | 25 | |
rondekoster | 1:e46a729c44db | 26 | } FONT_INFO; |
rondekoster | 1:e46a729c44db | 27 | |
rondekoster | 1:e46a729c44db | 28 | #include "Calibri36pt.h" |
rondekoster | 1:e46a729c44db | 29 | #include "TrebuchetMS270pt.h" |
rondekoster | 1:e46a729c44db | 30 | #include "TrebuchetMS135pt.h" |
rondekoster | 1:e46a729c44db | 31 | |
rondekoster | 1:e46a729c44db | 32 | typedef enum |
rondekoster | 1:e46a729c44db | 33 | { |
rondekoster | 1:e46a729c44db | 34 | ALIGN_CENTER, |
rondekoster | 1:e46a729c44db | 35 | ALIGN_RIGHT, |
rondekoster | 1:e46a729c44db | 36 | ALIGN_LEFT |
rondekoster | 1:e46a729c44db | 37 | |
rondekoster | 1:e46a729c44db | 38 | } FONTX_ALIGNMENT_ENUM; |
rondekoster | 1:e46a729c44db | 39 | |
rondekoster | 1:e46a729c44db | 40 | uint32_t FontX_GetLength(char *Text,const FONT_INFO *pFont); |
rondekoster | 1:e46a729c44db | 41 | uint32_t FontX_GetHeight(const FONT_INFO *pFont); |
rondekoster | 1:e46a729c44db | 42 | void FontX_DisplayStringAt(uint16_t Xpos,uint16_t Ypos,uint16_t width,char *Text,FONTX_ALIGNMENT_ENUM Alignment,const FONT_INFO *pFont,uint32_t colorText,uint32_t colorBack); |
rondekoster | 1:e46a729c44db | 43 | uint32_t FontX_DisplayChar(uint16_t Xpos,uint16_t Ypos,char Ascii,const FONT_INFO *pFont,uint32_t colorText,uint32_t colorBack); |
rondekoster | 1:e46a729c44db | 44 | |
rondekoster | 1:e46a729c44db | 45 | #endif |
rondekoster | 1:e46a729c44db | 46 |