mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 08:41:01 +01:00
[Kandinsky] Create a KDText class for text measurement
Change-Id: Ie3ecd402b5476f41a2f8694a276f62495fbcdbd1
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include <kandinsky/context.h>
|
||||
#include <string.h>
|
||||
#include "font.h"
|
||||
|
||||
void KDContext::drawChar(char character, KDPoint p, uint8_t inverse) {
|
||||
@@ -24,7 +23,3 @@ void KDContext::drawString(const char * text, KDPoint p, uint8_t inverse) {
|
||||
position = position.translatedBy(characterSize);
|
||||
}
|
||||
}
|
||||
|
||||
KDSize KDContext::stringSize(const char * text) {
|
||||
return KDSize(BITMAP_FONT_CHARACTER_WIDTH*strlen(text), BITMAP_FONT_CHARACTER_HEIGHT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user