X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=gfx%2Ftext.h;h=4f603061896be9e971cd0d1996ee5abe9f3d0279;hb=6b2099c56772961182353617a8d4b839f6a1a6db;hp=1f00e7fa3aa58b7eb49453bd171fa28cf4c30c64;hpb=c66da8dee53d20f2bc02267d798530f5fb1bf37f;p=bertos.git diff --git a/gfx/text.h b/gfx/text.h index 1f00e7fa..4f603061 100755 --- a/gfx/text.h +++ b/gfx/text.h @@ -15,6 +15,12 @@ /*#* *#* $Log$ + *#* Revision 1.6 2006/04/27 05:39:24 bernie + *#* Enhance text rendering to arbitrary x,y coords. + *#* + *#* Revision 1.5 2006/04/11 00:08:24 bernie + *#* text_offset(): New function, but I'm not quite confident with the design. + *#* *#* Revision 1.4 2006/03/07 22:18:04 bernie *#* Correctly compute text width for prop fonts; Make styles a per-bitmap attribute. *#* @@ -65,6 +71,7 @@ #include #include /* BV() */ #include /* CPU_HARVARD */ +#include /* coord_t */ #include @@ -107,8 +114,8 @@ struct Bitmap; /* Low-level text functions (mware/text.c) */ -void text_moveto(struct Bitmap *bm, int row, int col); -void text_setcoord(struct Bitmap *bm, int x, int y); +void text_moveTo(struct Bitmap *bm, int col, int row); +void text_setCoord(struct Bitmap *bm, int x, int y); int text_putchar(char c, struct Bitmap *bm); uint8_t text_style(struct Bitmap *bm, uint8_t flags, uint8_t mask); void text_clear(struct Bitmap *bm); @@ -118,6 +125,8 @@ void text_clearLine(struct Bitmap *bm, int line); int text_puts(const char *str, struct Bitmap *bm); int text_vprintf(struct Bitmap *bm, const char *fmt, va_list ap); int text_printf(struct Bitmap *bm, const char *fmt, ...) FORMAT(__printf__, 2, 3); +int text_xyvprintf(struct Bitmap *bm, coord_t x, coord_t y, uint16_t mode, const char *fmt, va_list ap); +int text_xyprintf(struct Bitmap *bm, coord_t x, coord_t col, uint16_t mode, const char *fmt, ...) FORMAT(__printf__, 5, 6); int text_xprintf(struct Bitmap *bm, uint8_t row, uint8_t col, uint16_t mode, const char *fmt, ...) FORMAT(__printf__, 5, 6); int text_vwidthf(struct Bitmap *bm, const char * fmt, va_list ap); int text_widthf(struct Bitmap *bm, const char * fmt, ...) FORMAT(__printf__, 2, 3);