[Kandinsky] Create a KDText class for text measurement

Change-Id: Ie3ecd402b5476f41a2f8694a276f62495fbcdbd1
This commit is contained in:
Romain Goyet
2016-08-19 10:28:43 +02:00
parent d2ff3457b5
commit f93da3b0d8
8 changed files with 22 additions and 8 deletions

7
kandinsky/src/text.cpp Normal file
View File

@@ -0,0 +1,7 @@
#include <kandinsky/text.h>
#include <string.h>
#include "font.h"
KDSize KDText::stringSize(const char * text) {
return KDSize(BITMAP_FONT_CHARACTER_WIDTH*strlen(text), BITMAP_FONT_CHARACTER_HEIGHT);
}