projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix naming conventions.
[bertos.git]
/
gfx
/
text.c
diff --git
a/gfx/text.c
b/gfx/text.c
index 08d3ae6167283343b7d0b4d4b31a7fc60fce1696..28dbd8e33c521dba455ef08474d902633ce729df 100755
(executable)
--- a/
gfx/text.c
+++ b/
gfx/text.c
@@
-15,6
+15,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.10 2006/04/27 05:39:23 bernie
+ *#* Enhance text rendering to arbitrary x,y coords.
+ *#*
+ *#* Revision 1.9 2006/04/11 00:08:24 bernie
+ *#* text_offset(): New function, but I'm not quite confident with the design.
+ *#*
*#* Revision 1.8 2006/03/22 09:50:37 bernie
*#* Use the same format for fonts and rasters.
*#*
*#* Revision 1.8 2006/03/22 09:50:37 bernie
*#* Use the same format for fonts and rasters.
*#*
@@
-104,33
+110,35
@@
#include <cfg/debug.h>
#include <cfg/debug.h>
-/*! ANSI escape sequences flag: true for ESC state on */
+/**
+ * ANSI escape sequences flag: true for ESC state on.
+ *
+ * \fixme Move to Bitmap.flags.
+ */
static bool ansi_mode = false;
static bool ansi_mode = false;
+/*!
+ * Move (imaginary) cursor to coordinates specified.
+ */
+void text_setCoord(struct Bitmap *bm, int x, int y)
+{
+ bm->penX = x;
+ bm->penY = y;
+}
+
/*!
* Move (imaginary) cursor to column and row specified.
* Next text write will start a that row and col.
*/
/*!
* Move (imaginary) cursor to column and row specified.
* Next text write will start a that row and col.
*/
-void text_move
t
o(struct Bitmap *bm, int row, int col)
+void text_move
T
o(struct Bitmap *bm, int row, int col)
{
ASSERT(col >= 0);
ASSERT(col < bm->width / bm->font->width);
ASSERT(row >= 0);
ASSERT(row < bm->height / bm->font->height);
{
ASSERT(col >= 0);
ASSERT(col < bm->width / bm->font->width);
ASSERT(row >= 0);
ASSERT(row < bm->height / bm->font->height);
- bm->penX = col * bm->font->width;
- bm->penY = row * bm->font->height;
-}
-
-
-/*!
- * Move (imaginary) cursor to coordinates specified.
- */
-void text_setcoord(struct Bitmap *bm, int x, int y)
-{
- bm->penX = x;
- bm->penY = y;
+ text_setCoord(bm, col * bm->font->width, row * bm->font->height);
}
}