X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=gfx%2Fgfx.h;h=324c7c59b97c272ae049491eb0116e20b65e393a;hb=0c154bc0927a32f77467f32aac3cc3507baa97ca;hp=fb7e615f7b4be737c3ca17b2b64a3698a07899a1;hpb=39108834d9c102712d6c11830ca9b9fb5b098d19;p=bertos.git diff --git a/gfx/gfx.h b/gfx/gfx.h index fb7e615f..324c7c59 100755 --- a/gfx/gfx.h +++ b/gfx/gfx.h @@ -14,6 +14,12 @@ /*#* *#* $Log$ + *#* Revision 1.11 2006/03/07 22:18:04 bernie + *#* Correctly compute text width for prop fonts; Make styles a per-bitmap attribute. + *#* + *#* Revision 1.10 2006/02/17 22:24:40 bernie + *#* Fix undefined preprocessor symbol. + *#* *#* Revision 1.9 2006/02/15 09:10:15 bernie *#* Implement prop fonts; Fix algo styles. *#* @@ -38,6 +44,14 @@ #include /* CONFIG_GFX_* */ +/** + * \name Known pixel formats for bitmap representation. + * \{ + */ +#define BITMAP_FMT_PLANAR_H_MSB 1 /**< Planar pixels, horizontal bytes, MSB left. */ +#define BITMAP_FMT_PLANAR_V_LSB 2 /**< Planar pixels, vertical bytes, LSB top. */ +/* \} */ + #if !defined(CONFIG_BITMAP_FMT) || (CONFIG_BITMAP_FMT != BITMAP_FMT_PLANAR_H_MSB && CONFIG_BITMAP_FMT != BITMAP_FMT_PLANAR_V_LSB) #error CONFIG_BITMAP_FMT must be defined to either BITMAP_FMT_PLANAR_H_LSB or BITMAP_FMT_PLANAR_V_LSB #endif @@ -48,14 +62,6 @@ #error CONFIG_GFX_TEXT must be defined to either 0 or 1 #endif -/** - * \name Known pixel formats for bitmap representation. - * \{ - */ -#define BITMAP_FMT_PLANAR_H_MSB 1 /**< Planar pixels, horizontal bytes, MSB left. */ -#define BITMAP_FMT_PLANAR_V_LSB 2 /**< Planar pixels, vertical bytes, LSB top. */ -/* \} */ - EXTERN_C_BEGIN /*! Common type for coordinates expressed in pixel units */ @@ -122,6 +128,15 @@ typedef struct Bitmap #if CONFIG_GFX_TEXT const struct Font *font;/**< Current font for text rendering. */ + + /** + * Algorithmic text style flags. + * + * The text rendering routine can apply a few simple transformations + * to the current font in order to generate common styles such as + * bold, italic and underline from plain glyphs. + */ + uint8_t styles; #endif #if CONFIG_GFX_VCOORDS /*!