diff --git a/Sources/libewol/ewol/OObject/2DColored.cpp b/Sources/libewol/ewol/OObject/2DColored.cpp index 5c2d6e54..cc1aba76 100644 --- a/Sources/libewol/ewol/OObject/2DColored.cpp +++ b/Sources/libewol/ewol/OObject/2DColored.cpp @@ -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); diff --git a/Sources/libewol/ewol/OObject/2DTextColored.cpp b/Sources/libewol/ewol/OObject/2DTextColored.cpp index a3b5c701..89f8776e 100644 --- a/Sources/libewol/ewol/OObject/2DTextColored.cpp +++ b/Sources/libewol/ewol/OObject/2DTextColored.cpp @@ -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) { diff --git a/Sources/libewol/ewol/OObject/2DTextColored.h b/Sources/libewol/ewol/OObject/2DTextColored.h index 0c9efb38..4bca08ba 100644 --- a/Sources/libewol/ewol/OObject/2DTextColored.h +++ b/Sources/libewol/ewol/OObject/2DTextColored.h @@ -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 m_coordTex; //!< internal texture coordinate for every point etk::VectorType 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); }; };