diff --git a/jni/elementCircle.cpp b/jni/elementCircle.cpp index 92621d2..50ae019 100644 --- a/jni/elementCircle.cpp +++ b/jni/elementCircle.cpp @@ -19,7 +19,14 @@ drawElement::Circle::Circle(void) : Base("Circle") { - + m_color.red = 1.0; + m_color.green = 1.0; + m_color.blue = 1.0; + m_color.alpha = 1.0; + m_center.x = 0; + m_center.y = 0; + m_ratio = 0.3; + m_thickness = 0.03; } drawElement::Circle::~Circle(void) @@ -29,8 +36,8 @@ drawElement::Circle::~Circle(void) void drawElement::Circle::Draw(ewol::OObject2DColored &OObjects) { - OObjects.SetColor(1.0, 0.0, 1.0, 1.0); - OObjects.Circle(0.2, 0.2, 0.3, 0.05); + OObjects.SetColor(m_color); + OObjects.Circle(m_center.x, m_center.y, m_ratio, m_thickness); } diff --git a/jni/elementCircle.h b/jni/elementCircle.h index b95b49d..f6e5709 100644 --- a/jni/elementCircle.h +++ b/jni/elementCircle.h @@ -23,9 +23,29 @@ namespace drawElement { Circle(void); virtual ~Circle(void); private: - + color_ts m_color; + coord2D_ts m_center; + int32_t m_nbRay; + etkFloat_t m_ratio; + etkFloat_t m_thickness; + etkFloat_t m_shadowOutput; + etkFloat_t m_shadowInput; public: + void ColorSet(color_ts color) { m_color = color; }; + color_ts ColorGet(void) { return m_color; }; + void CenterSet(coord2D_ts center) { m_center = center; }; + coord2D_ts CenterGet(void) { return m_center; }; + void RatioSet(etkFloat_t ratio) { m_ratio = ratio; }; + etkFloat_t RatioGet(void) { return m_ratio; }; + void ThicknessSet(etkFloat_t thickness) { m_thickness = thickness; }; + etkFloat_t ThicknessGet(void) { return m_thickness; }; + void ShadowOutputSet(etkFloat_t shadowOutput) { m_shadowOutput = shadowOutput; }; + etkFloat_t ShadowOutputGet(void) { return m_shadowOutput; }; + void ShadowInputSet(etkFloat_t shadowInput) { m_shadowInput = shadowInput; }; + etkFloat_t ShadowInputGet(void) { return m_shadowInput; }; + void NbRaySet(int32_t nbRay) { m_nbRay = nbRay; }; + int32_t nbRayGet(void) { return m_nbRay; }; public: virtual void Draw(ewol::OObject2DColored &OObjects); }; diff --git a/jni/elementRectangle.cpp b/jni/elementRectangle.cpp index 8829b74..941078a 100644 --- a/jni/elementRectangle.cpp +++ b/jni/elementRectangle.cpp @@ -30,7 +30,7 @@ drawElement::Rectangle::~Rectangle(void) void drawElement::Rectangle::Draw(ewol::OObject2DColored &OObjects) { OObjects.SetColor(1.0, 0.0, 0.0, 1.0); - OObjects.Rectangle(0.5, 0.5, 0.3, 0.3); + OObjects.Rectangle(0.2, 0.5, 0.3, 0.6); } diff --git a/jni/widgetDrawer.cpp b/jni/widgetDrawer.cpp index 615e318..966e8da 100644 --- a/jni/widgetDrawer.cpp +++ b/jni/widgetDrawer.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #undef __class__ @@ -115,17 +116,21 @@ bool widgetDrawer::CalculateMinSize(void) void widgetDrawer::OnDraw(void) { - m_OObjectsColored[ m_currentDrawId].Draw(); - m_OObjectTextNormal[ m_currentDrawId].Draw(); + m_OObjectsColored[ m_currentDrawId].Draw(); + m_OObjectsColoredElement[m_currentDrawId].Draw(); + m_OObjectTextNormal[ m_currentDrawId].Draw(); } + #define BORDER_SIZE (2) void widgetDrawer::OnRegenerateDisplay(void) { if (true == NeedRedraw()) { + // clean internal elements ... - m_OObjectTextNormal[ m_currentCreateId].SetFontID(m_fontNormal); - m_OObjectTextNormal[ m_currentCreateId].Clear(); - m_OObjectsColored[ m_currentCreateId].Clear(); + m_OObjectTextNormal[ m_currentCreateId].SetFontID(m_fontNormal); + m_OObjectTextNormal[ m_currentCreateId].Clear(); + m_OObjectsColored[ m_currentCreateId].Clear(); + m_OObjectsColoredElement[m_currentCreateId].Clear(); // we set 3 pixels in the border (blue) and draw color_ts bandColor; bandColor.red = 0.0; @@ -174,6 +179,18 @@ void widgetDrawer::OnRegenerateDisplay(void) for (int32_t iii=0; iiiDraw(m_OObjectsColoredElement[m_currentCreateId]); + } + } + /* m_OObjectsColored[m_currentCreateId].clippingDisable(); for (int32_t iii=0; iii