Files
Upsilon/kandinsky/src/text.cpp
Émilie Feral ee02edee35 [escher] In text view, clean how exception (nullptr) are handled
Change-Id: Ibd1c3939c910a3da741bb92f8b341e02cf0bb63c
2016-10-14 12:24:32 +02:00

11 lines
257 B
C++

#include <kandinsky/text.h>
#include <string.h>
#include "font.h"
KDSize KDText::stringSize(const char * text) {
if (text == nullptr) {
return KDSizeZero;
}
return KDSize(BITMAP_FONT_CHARACTER_WIDTH*strlen(text), BITMAP_FONT_CHARACTER_HEIGHT);
}