diff options
-rw-r--r-- | include/gdisp/fonts.h | 123 | ||||
-rw-r--r-- | include/gdisp/image.h | 3 | ||||
-rw-r--r-- | src/gdisp/fonts.c | 1 | ||||
-rw-r--r-- | src/gdisp/image.c | 3 | ||||
-rw-r--r-- | src/gdisp/image_bmp.c | 3 | ||||
-rw-r--r-- | src/gdisp/image_gif.c | 5 | ||||
-rw-r--r-- | src/gdisp/image_native.c | 3 | ||||
-rw-r--r-- | src/gdisp/image_png.c | 5 |
8 files changed, 82 insertions, 64 deletions
diff --git a/include/gdisp/fonts.h b/include/gdisp/fonts.h index f4e6f5dd..ca175b77 100644 --- a/include/gdisp/fonts.h +++ b/include/gdisp/fonts.h @@ -4,64 +4,65 @@ * * http://chibios-gfx.com/license.html */ -
-/**
- * @file include/gdisp/fonts.h
- * @brief GDISP internal font definitions.
- * @details This is not generally needed by an application. It is used
- * by the low level drivers that need to understand a font.
- *
- * @addtogroup GDISP
- * @{
- */
-
-#ifndef _GDISP_FONTS_H
-#define _GDISP_FONTS_H
-
-/* Don't test against GFX_USE_GDISP as we may want to use this in other non-GDISP utilities. */
-
-/**
- * @brief The type of a font column.
- * @note Set by defining @p GDISP_MAX_FNT_HEIGHT appropriately.
- */
-#if GDISP_MAX_FONT_HEIGHT == 16
- typedef uint16_t fontcolumn_t;
-#elif GDISP_MAX_FONT_HEIGHT == 32
- typedef uint32_t fontcolumn_t;
-#else
- #error "GDISP: GDISP_MAX_FONT_HEIGHT must be either 16 or 32"
-#endif
-
-/**
- * @brief Internal font structure.
- * @note This structure is followed by:
- * 1. An array of character widths (uint8_t)
- * 2. An array of column data offsets (relative to the font structure)
- * 3. Each characters array of column data (fontcolumn_t)
- * Each sub-structure must be padded to a multiple of 8 bytes
- * to allow the tables to work across many different compilers.
- */
-struct font {
- const char * name;
- uint8_t height;
- uint8_t charPadding;
- uint8_t lineSpacing;
- uint8_t descenderHeight;
- uint8_t minWidth;
- uint8_t maxWidth;
- char minChar;
- char maxChar;
- uint8_t xscale;
- uint8_t yscale;
- const uint8_t *widthTable;
- const uint16_t *offsetTable;
- const fontcolumn_t *dataTable;
-};
-
-#define _getCharWidth(f,c) (((c) < (f)->minChar || (c) > (f)->maxChar) ? 0 : (f)->widthTable[(c) - (f)->minChar])
-#define _getCharOffset(f,c) ((f)->offsetTable[(c) - (f)->minChar])
-#define _getCharData(f,c) (&(f)->dataTable[_getCharOffset(f, c)])
-
-#endif /* _GDISP_FONTS_H */
-/** @} */
-
+ +/** + * @file include/gdisp/fonts.h + * @brief GDISP internal font definitions. + * @details This is not generally needed by an application. It is used + * by the low level drivers that need to understand a font. + * + * @addtogroup GDISP + * + * @{ + */ + +#ifndef _GDISP_FONTS_H +#define _GDISP_FONTS_H + +/* Don't test against GFX_USE_GDISP as we may want to use this in other non-GDISP utilities. */ + +/** + * @brief The type of a font column. + * @note Set by defining @p GDISP_MAX_FNT_HEIGHT appropriately. + */ +#if GDISP_MAX_FONT_HEIGHT == 16 + typedef uint16_t fontcolumn_t; +#elif GDISP_MAX_FONT_HEIGHT == 32 + typedef uint32_t fontcolumn_t; +#else + #error "GDISP: GDISP_MAX_FONT_HEIGHT must be either 16 or 32" +#endif + +/** + * @brief Internal font structure. + * @note This structure is followed by: + * 1. An array of character widths (uint8_t) + * 2. An array of column data offsets (relative to the font structure) + * 3. Each characters array of column data (fontcolumn_t) + * Each sub-structure must be padded to a multiple of 8 bytes + * to allow the tables to work across many different compilers. + */ +struct font { + const char * name; + uint8_t height; + uint8_t charPadding; + uint8_t lineSpacing; + uint8_t descenderHeight; + uint8_t minWidth; + uint8_t maxWidth; + char minChar; + char maxChar; + uint8_t xscale; + uint8_t yscale; + const uint8_t *widthTable; + const uint16_t *offsetTable; + const fontcolumn_t *dataTable; +}; + +#define _getCharWidth(f,c) (((c) < (f)->minChar || (c) > (f)->maxChar) ? 0 : (f)->widthTable[(c) - (f)->minChar]) +#define _getCharOffset(f,c) ((f)->offsetTable[(c) - (f)->minChar]) +#define _getCharData(f,c) (&(f)->dataTable[_getCharOffset(f, c)]) + +#endif /* _GDISP_FONTS_H */ +/** @} */ + diff --git a/include/gdisp/image.h b/include/gdisp/image.h index d0339e0e..f169a0f1 100644 --- a/include/gdisp/image.h +++ b/include/gdisp/image.h @@ -9,7 +9,8 @@ * @file include/gdisp/image.h * @brief GDISP image header file. * - * @addtogroup GDISP + * @defgroup Image Image + * @ingroup GDISP * @{ */ diff --git a/src/gdisp/fonts.c b/src/gdisp/fonts.c index f0d9f8fd..3d29e50c 100644 --- a/src/gdisp/fonts.c +++ b/src/gdisp/fonts.c @@ -10,6 +10,7 @@ * @brief GDISP Font Handling. * * @addtogroup GDISP + * * @{ */ diff --git a/src/gdisp/image.c b/src/gdisp/image.c index ce4e1250..2a648e59 100644 --- a/src/gdisp/image.c +++ b/src/gdisp/image.c @@ -8,6 +8,9 @@ /** * @file src/gdisp/image.c * @brief GDISP generic image code. + * + * @defgroup Image Image + * @ingroup GDISP */ #include "ch.h" #include "hal.h" diff --git a/src/gdisp/image_bmp.c b/src/gdisp/image_bmp.c index be97eb39..830ee327 100644 --- a/src/gdisp/image_bmp.c +++ b/src/gdisp/image_bmp.c @@ -8,6 +8,9 @@ /** * @file src/gdisp/image_bmp.c * @brief GDISP native image code. + * + * @defgroup Image Image + * @ingroup GDISP */ #include "ch.h" #include "hal.h" diff --git a/src/gdisp/image_gif.c b/src/gdisp/image_gif.c index 084e2fb7..2cf4c743 100644 --- a/src/gdisp/image_gif.c +++ b/src/gdisp/image_gif.c @@ -8,7 +8,10 @@ /** * @file src/gdisp/image_gif.c * @brief GDISP native image code. - */ + * + * @defgroup Image Image + * @ingroup GDISP +*/ #include "ch.h" #include "hal.h" #include "gfx.h" diff --git a/src/gdisp/image_native.c b/src/gdisp/image_native.c index 43a342cc..6da4e862 100644 --- a/src/gdisp/image_native.c +++ b/src/gdisp/image_native.c @@ -8,6 +8,9 @@ /** * @file src/gdisp/image_native.c * @brief GDISP native image code. + * + * @defgroup Image Image + * @ingroup GDISP */ #include "ch.h" #include "hal.h" diff --git a/src/gdisp/image_png.c b/src/gdisp/image_png.c index 2ea59f8b..1cfba97f 100644 --- a/src/gdisp/image_png.c +++ b/src/gdisp/image_png.c @@ -8,7 +8,10 @@ /** * @file src/gdisp/image_png.c * @brief GDISP native image code. - */ + * + * @defgroup Image Image + * @ingroup GDISP +*/ #include "ch.h" #include "hal.h" #include "gfx.h" |