add a specific font color managed for the font display
This commit is contained in:
parent
5968cad883
commit
182879be3e
@ -467,7 +467,7 @@ void ewol::OObject2DColored::Rectangle(etkFloat_t x, etkFloat_t y, etkFloat_t w,
|
|||||||
etkFloat_t dyC = x + w;
|
etkFloat_t dyC = x + w;
|
||||||
etkFloat_t dyD = y + h;
|
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) {
|
if (dxA < drawClipping.x) {
|
||||||
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) {
|
if (dyD > drawClipping.y + drawClipping.h) {
|
||||||
dyD = drawClipping.y + drawClipping.h;
|
dyD = drawClipping.y + drawClipping.h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SetPoint(dxA, dyD);
|
SetPoint(dxA, dyD);
|
||||||
SetPoint(dxA, dxB);
|
SetPoint(dxA, dxB);
|
||||||
|
@ -40,9 +40,23 @@ ewol::OObject2DTextColored::OObject2DTextColored(etk::String FontName, int32_t s
|
|||||||
EWOL_TODO("pas encore fait...");
|
EWOL_TODO("pas encore fait...");
|
||||||
//m_FontId = GetFontIdWithName(FontName);
|
//m_FontId = GetFontIdWithName(FontName);
|
||||||
m_FontId = -1;
|
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 ...
|
// open with default font ...
|
||||||
ewol::OObject2DTextColored::OObject2DTextColored(void)
|
ewol::OObject2DTextColored::OObject2DTextColored(void)
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@ namespace ewol {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OObject2DTextColored(etk::String FontName, int32_t size);
|
OObject2DTextColored(etk::String FontName, int32_t size);
|
||||||
|
OObject2DTextColored(int32_t fontID);
|
||||||
OObject2DTextColored(void);
|
OObject2DTextColored(void);
|
||||||
virtual ~OObject2DTextColored(void);
|
virtual ~OObject2DTextColored(void);
|
||||||
public:
|
public:
|
||||||
@ -50,6 +51,7 @@ namespace ewol {
|
|||||||
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
||||||
etk::VectorType<color_ts> m_coordColor; //!< internal color of the different point
|
etk::VectorType<color_ts> m_coordColor; //!< internal color of the different point
|
||||||
public:
|
public:
|
||||||
|
int32_t GetFontID(void) { return m_FontId; };
|
||||||
virtual void UpdateOrigin(etkFloat_t x, etkFloat_t y);
|
virtual void UpdateOrigin(etkFloat_t x, etkFloat_t y);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user