Add demo application.
[bertos.git] / gfx / text.h
index a064e8c99b441ce6530370e9a701bcbcdb69da70..1f00e7fa3aa58b7eb49453bd171fa28cf4c30c64 100755 (executable)
 
 /*#*
  *#* $Log$
+ *#* Revision 1.4  2006/03/07 22:18:04  bernie
+ *#* Correctly compute text width for prop fonts; Make styles a per-bitmap attribute.
+ *#*
+ *#* Revision 1.3  2006/02/10 12:26:19  bernie
+ *#* Add STYLEF_TALL (unimplemented).
+ *#*
  *#* Revision 1.2  2005/11/04 18:17:45  bernie
  *#* Fix header guards and includes for new location of gfx module.
  *#*
 #define STYLEF_EXPANDED    BV(4)
 #define STYLEF_CONDENSED   BV(5)
 #define STYLEF_STRIKEOUT   BV(6)  /*<! Not implemented */
+#define STYLEF_TALL        BV(7)  /*<! Not implemented */
 
 #define STYLEF_MASK \
-       (STYLEF_BOLD | STYLEF_ITALIC | STYLEF_UNDERLINE | \
-       STYLEF_EXPANDED | STYLEF_CONDENSED | STYLEF_INVERT)
+       (STYLEF_BOLD | STYLEF_ITALIC | STYLEF_UNDERLINE \
+       | STYLEF_INVERT | STYLEF_EXPANDED | STYLEF_CONDENSED \
+       | STYLEF_STRIKEOUT | STYLEF_TALL)
 /*\}*/
 
 /*!
@@ -86,9 +94,9 @@
  * \{
  */
 #define TEXT_NORMAL   0       /*!< Normal mode */
-#define TEXT_FILL     BV(7)   /*!< Fill rest of line with spaces */
-#define TEXT_CENTER   BV(8)   /*!< Center string in line */
-#define TEXT_RIGHT    BV(9)   /*!< Right aligned */
+#define TEXT_FILL     BV(13)  /*!< Fill rest of line with spaces */
+#define TEXT_CENTER   BV(14)  /*!< Center string in line */
+#define TEXT_RIGHT    BV(15)  /*!< Right aligned */
 /*\}*/
 
 /*! Escape sequences codes */
@@ -102,7 +110,7 @@ struct Bitmap;
 void text_moveto(struct Bitmap *bm, int row, int col);
 void text_setcoord(struct Bitmap *bm, int x, int y);
 int text_putchar(char c, struct Bitmap *bm);
-uint8_t text_style(uint8_t flags, uint8_t mask);
+uint8_t text_style(struct Bitmap *bm, uint8_t flags, uint8_t mask);
 void text_clear(struct Bitmap *bm);
 void text_clearLine(struct Bitmap *bm, int line);