Files
Upsilon/escher/src/buffer_text_view.cpp
Émilie Feral f51ae5db12 [kandinsky] Introduce two fonts: small font and large font
Change-Id: I502dfa88d627b09ac5af76155140af63547025cd
2017-01-27 11:14:01 +01:00

20 lines
559 B
C++

#include <escher/buffer_text_view.h>
#include <string.h>
#include <assert.h>
BufferTextView::BufferTextView(KDText::FontSize size, float horizontalAlignment, float verticalAlignment,
KDColor textColor, KDColor backgroundColor) :
TextView(size, horizontalAlignment, verticalAlignment, textColor, backgroundColor)
{
}
const char * BufferTextView::text() const {
return m_buffer;
}
void BufferTextView::setText(const char * text) {
assert(strlen(text) < sizeof(m_buffer));
strlcpy(m_buffer, text, sizeof(m_buffer));
markRectAsDirty(bounds());
}