From 8cd909baf9fb071e39b33f6147b86b6d155d353e Mon Sep 17 00:00:00 2001 From: marschap Date: Sat, 4 Jun 2005 12:40:17 +0000 Subject: [PATCH] add CFontz633_cellwidth() and CFontz633_cellheight() functions so that CFontz633 and CFontzPacket return the correct cell dimensions to clients --- server/drivers/CFontz633.c | 28 ++++++++++++++++++++++++++-- server/drivers/CFontz633.h | 2 ++ server/drivers/CFontzPacket.c | 30 +++++++++++++++++++++++++++--- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/server/drivers/CFontz633.c b/server/drivers/CFontz633.c index f4c012b..6f4ad61 100644 --- a/server/drivers/CFontz633.c +++ b/server/drivers/CFontz633.c @@ -330,7 +330,7 @@ CFontz633_close (Driver *drvthis) /* - * Returns the display width + * Returns the display width in characters */ MODULE_EXPORT int CFontz633_width (Driver *drvthis) @@ -342,7 +342,7 @@ CFontz633_width (Driver *drvthis) /* - * Returns the display height + * Returns the display height in characters */ MODULE_EXPORT int CFontz633_height (Driver *drvthis) @@ -353,6 +353,30 @@ CFontz633_height (Driver *drvthis) } +/* + * Returns the width of a character in pixels + */ +MODULE_EXPORT int +CFontz633_cellwidth (Driver *drvthis) +{ + PrivateData *p = drvthis->private_data; + + return p->cellwidth; +} + + +/* + * Returns the height of a character in pixels + */ +MODULE_EXPORT int +CFontz633_cellheight (Driver *drvthis) +{ + PrivateData *p = drvthis->private_data; + + return p->cellheight; +} + + /* * Flushes all output to the lcd... */ diff --git a/server/drivers/CFontz633.h b/server/drivers/CFontz633.h index 70c7be6..299c627 100644 --- a/server/drivers/CFontz633.h +++ b/server/drivers/CFontz633.h @@ -20,6 +20,8 @@ MODULE_EXPORT int CFontz633_init (Driver *drvthis, char *device); MODULE_EXPORT void CFontz633_close (Driver *drvthis); MODULE_EXPORT int CFontz633_width (Driver *drvthis); MODULE_EXPORT int CFontz633_height (Driver *drvthis); +MODULE_EXPORT int CFontz633_cellwidth (Driver *drvthis); +MODULE_EXPORT int CFontz633_cellheight (Driver *drvthis); MODULE_EXPORT void CFontz633_clear (Driver *drvthis); MODULE_EXPORT void CFontz633_flush (Driver *drvthis); MODULE_EXPORT void CFontz633_string (Driver *drvthis, int x, int y, char string[]); diff --git a/server/drivers/CFontzPacket.c b/server/drivers/CFontzPacket.c index a4b9e80..7de4db2 100644 --- a/server/drivers/CFontzPacket.c +++ b/server/drivers/CFontzPacket.c @@ -391,8 +391,8 @@ CFontz633_close (Driver *drvthis) } -/* OK631 - * Returns the display width +/* + * Returns the display width in characters */ MODULE_EXPORT int CFontz633_width (Driver *drvthis) @@ -404,7 +404,7 @@ CFontz633_width (Driver *drvthis) /* - * Returns the display height + * Returns the display height in characters */ MODULE_EXPORT int CFontz633_height (Driver *drvthis) @@ -415,6 +415,30 @@ CFontz633_height (Driver *drvthis) } +/* + * Returns the width of a character in pixels + */ +MODULE_EXPORT int +CFontz633_cellwidth (Driver *drvthis) +{ + PrivateData *p = drvthis->private_data; + + return p->cellwidth; +} + + +/* + * Returns the height of a character in pixels + */ +MODULE_EXPORT int +CFontz633_cellheight (Driver *drvthis) +{ + PrivateData *p = drvthis->private_data; + + return p->cellheight; +} + + /* * Flushes all output to the lcd... */