add a specific font color managed for the font display

This commit is contained in:
Edouard Dupin 2012-02-03 18:15:43 +01:00
parent 5968cad883
commit 182879be3e
3 changed files with 18 additions and 3 deletions

View File

@ -467,7 +467,7 @@ void ewol::OObject2DColored::Rectangle(etkFloat_t x, etkFloat_t y, etkFloat_t w,
etkFloat_t dyC = x + w;
etkFloat_t dyD = y + h;
//EWOL_INFO("Rectangle size : (" << x << "," << y << ") in clipping (" << drawClipping.x << "," << drawClipping.y << ") ==> (" << drawClipping.w << "," << drawClipping.h << ")");
if (dxA < drawClipping.x) {
dxA = drawClipping.x;
}
@ -480,7 +480,6 @@ void ewol::OObject2DColored::Rectangle(etkFloat_t x, etkFloat_t y, etkFloat_t w,
if (dyD > drawClipping.y + drawClipping.h) {
dyD = drawClipping.y + drawClipping.h;
}
SetPoint(dxA, dyD);
SetPoint(dxA, dxB);

View File

@ -40,9 +40,23 @@ ewol::OObject2DTextColored::OObject2DTextColored(etk::String FontName, int32_t s
EWOL_TODO("pas encore fait...");
//m_FontId = GetFontIdWithName(FontName);
m_FontId = -1;
return;
}
}
ewol::OObject2DTextColored::OObject2DTextColored(int32_t fontID)
{
m_color.red = 0.0;
m_color.green = 0.0;
m_color.blue = 0.0;
m_color.alpha = 1.0;
if (fontID < 0) {
m_FontId = GetDefaultFontId();
} else {
m_FontId = fontID;
}
}
// open with default font ...
ewol::OObject2DTextColored::OObject2DTextColored(void)
{

View File

@ -32,6 +32,7 @@ namespace ewol {
{
public:
OObject2DTextColored(etk::String FontName, int32_t size);
OObject2DTextColored(int32_t fontID);
OObject2DTextColored(void);
virtual ~OObject2DTextColored(void);
public:
@ -50,6 +51,7 @@ namespace ewol {
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
etk::VectorType<color_ts> m_coordColor; //!< internal color of the different point
public:
int32_t GetFontID(void) { return m_FontId; };
virtual void UpdateOrigin(etkFloat_t x, etkFloat_t y);
};
};