mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
lcd fontrenderer: port to new API usage
This commit is contained in:
@@ -308,6 +308,11 @@ void LcdFont::RenderString(int x, int y, const int width, const char * text, con
|
|||||||
pthread_mutex_unlock(&renderer->render_mutex);
|
pthread_mutex_unlock(&renderer->render_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int LcdFont::getRenderWidth(const std::string &text, const bool utf8_encoded)
|
||||||
|
{
|
||||||
|
return getRenderWidth(text.c_str(), utf8_encoded);
|
||||||
|
};
|
||||||
|
|
||||||
int LcdFont::getRenderWidth(const char * text, const bool utf8_encoded)
|
int LcdFont::getRenderWidth(const char * text, const bool utf8_encoded)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&renderer->render_mutex);
|
pthread_mutex_lock(&renderer->render_mutex);
|
||||||
|
@@ -56,13 +56,15 @@ class LcdFont
|
|||||||
|
|
||||||
FT_Error getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit);
|
FT_Error getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void RenderString(int x, int y, int width, const char *text, int color, int selected=0, const bool utf8_encoded = false);
|
void RenderString(int x, int y, int width, const char *text, int color,
|
||||||
|
int selected = 0, const bool utf8_encoded = true);
|
||||||
|
|
||||||
int getRenderWidth(const char *text, const bool utf8_encoded = false);
|
int getRenderWidth(const char *text, const bool utf8_encoded = true);
|
||||||
|
int getRenderWidth(const std::string &text, const bool utf8_encoded = true);
|
||||||
|
|
||||||
LcdFont(CLCDDisplay *fb, LcdFontRenderClass *render, FTC_FaceID faceid, int isize);
|
LcdFont(CLCDDisplay *fb, LcdFontRenderClass *render, FTC_FaceID faceid, int isize);
|
||||||
~LcdFont(){}
|
~LcdFont(){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user