projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Misc build and doc fixes from Grillo.
[bertos.git]
/
gfx
/
text_format.c
diff --git
a/gfx/text_format.c
b/gfx/text_format.c
index c56eea6b4e9f1cb7f155afdf6deb62f64333c89c..c59a3af9141cd81442d05f6773319e2ca5ac4bc4 100755
(executable)
--- a/
gfx/text_format.c
+++ b/
gfx/text_format.c
@@
-15,6
+15,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.4 2006/02/10 12:31:33 bernie
+ *#* Add multiple font support in bitmaps.
+ *#*
+ *#* Revision 1.3 2005/11/27 23:31:58 bernie
+ *#* Reorder includes.
+ *#*
*#* Revision 1.2 2005/11/04 18:17:45 bernie
*#* Fix header guards and includes for new location of gfx module.
*#*
*#* Revision 1.2 2005/11/04 18:17:45 bernie
*#* Fix header guards and includes for new location of gfx module.
*#*
@@
-59,10
+65,11
@@
*#*
*#*/
*#*
*#*/
-#include <gfx/text.h>
+#include "text.h"
+
+#include <mware/formatwr.h> /* _formatted_write() */
#include <gfx/font.h>
#include <gfx/gfx.h>
#include <gfx/font.h>
#include <gfx/gfx.h>
-#include <mware/formatwr.h> /* _formatted_write() */
#include <stdio.h> /* vsprintf() */
#include <stdarg.h>
#include <stdio.h> /* vsprintf() */
#include <stdarg.h>
@@
-163,17
+170,17
@@
int PGM_FUNC(text_xprintf)(struct Bitmap *bm,
pad /= 2;
if (style & TEXT_FILL)
pad /= 2;
if (style & TEXT_FILL)
- gfx_rectFillC(bm, 0, row *
FONT_HEIGHT, pad, (row + 1) * FONT_HEIGHT
,
+ gfx_rectFillC(bm, 0, row *
bm->font->height, pad, (row + 1) * bm->font->height
,
(style & STYLEF_INVERT) ? 0xFF : 0x00);
(style & STYLEF_INVERT) ? 0xFF : 0x00);
- text_setcoord(bm, pad, row *
FONT_HEIGHT
);
+ text_setcoord(bm, pad, row *
bm->font->height
);
}
len = PGM_FUNC(text_vprintf)(bm, fmt, ap);
va_end(ap);
if (style & TEXT_FILL)
}
len = PGM_FUNC(text_vprintf)(bm, fmt, ap);
va_end(ap);
if (style & TEXT_FILL)
- gfx_rectFillC(bm, bm->penX, row *
FONT_HEIGHT, bm->width, (row + 1) * FONT_HEIGHT
,
+ gfx_rectFillC(bm, bm->penX, row *
bm->font->height, bm->width, (row + 1) * bm->font->height
,
(style & STYLEF_INVERT) ? 0xFF : 0x00);
/* Restore old style */
(style & STYLEF_INVERT) ? 0xFF : 0x00);
/* Restore old style */
@@
-192,7
+199,7
@@
int PGM_FUNC(text_vwidthf)(
const char * PGM_ATTR fmt,
va_list ap)
{
const char * PGM_ATTR fmt,
va_list ap)
{
- return PGM_FUNC(vsprintf)(NULL, fmt, ap) *
FONT_WIDTH
;
+ return PGM_FUNC(vsprintf)(NULL, fmt, ap) *
bm->font->width
;
}
}