diff --git a/Sources/libewol/ewol/EObject.h b/Sources/libewol/ewol/EObject.h index ef1f391a..faab1c78 100644 --- a/Sources/libewol/ewol/EObject.h +++ b/Sources/libewol/ewol/EObject.h @@ -58,7 +58,6 @@ namespace ewol { int32_t m_uniqueId; //!< Object UniqueID ==> TODO : Check if it use is needed etk::VectorType m_externEvent; //!< Generic list of event generation for output link etk::VectorType m_availlableEventId; //!< List of all event availlable for this widget - public: /** * @brief Constructor diff --git a/Sources/libewol/ewol/OObject.cpp b/Sources/libewol/ewol/OObject.cpp index 13a7437c..e3233295 100644 --- a/Sources/libewol/ewol/OObject.cpp +++ b/Sources/libewol/ewol/OObject.cpp @@ -35,7 +35,8 @@ ewol::OObject::OObject(void) { m_hasClipping = false; - // nothing to do ... + m_scaling.x = 1.0; + m_scaling.y = 1.0; } diff --git a/Sources/libewol/ewol/OObject.h b/Sources/libewol/ewol/OObject.h index dc60896b..ddf47c23 100644 --- a/Sources/libewol/ewol/OObject.h +++ b/Sources/libewol/ewol/OObject.h @@ -45,12 +45,14 @@ namespace ewol { protected: bool m_hasClipping; clipping_ts m_clipping; + coord2D_ts m_scaling; //!< scaling ol the object public: OObject(void); virtual ~OObject(void); void clippingSet(clipping_ts clip) {m_clipping = clip; m_hasClipping = true;}; void clippingDisable(void) {m_hasClipping = false;}; void clippingEnable(void) {m_hasClipping = true;}; + void scalingSet(coord2D_ts scale) {m_scaling = scale;}; virtual void Draw(void) = 0; }; }; diff --git a/Sources/libewol/ewol/OObject/2DColored.cpp b/Sources/libewol/ewol/OObject/2DColored.cpp index 276cae90..b8b19a92 100644 --- a/Sources/libewol/ewol/OObject/2DColored.cpp +++ b/Sources/libewol/ewol/OObject/2DColored.cpp @@ -50,11 +50,12 @@ void ewol::OObject2DColored::Draw(void) if (m_coord.Size()<=0) { return; } + glPushMatrix(); // Enable Pointers glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_COLOR_ARRAY ); - //glPushMatrix(); + glScalef(m_scaling.x, m_scaling.y, 1.0); // Set the vertex pointer to our vertex data glVertexPointer(2, oglTypeFloat_t, 0, &m_coord[0] ); @@ -67,6 +68,7 @@ void ewol::OObject2DColored::Draw(void) // Disable Pointers glDisableClientState( GL_COLOR_ARRAY ); glDisableClientState( GL_VERTEX_ARRAY ); + glPopMatrix(); }