[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

View File

@@ -8,7 +8,7 @@ extern "C" {
void print(const char * message) {
static int line_y = 0;
KDContext * ctx = KDIonContext::sharedContext();
int line_height = ctx->stringSize("M").height();
int line_height = KDText::stringSize("M").height();
ctx->drawString(message, KDPoint(0, line_y), 0);
line_y += line_height;
if (line_y > ION_SCREEN_HEIGHT) {