Set the scaling in the OObject
This commit is contained in:
parent
9d793d6d29
commit
89d1cf95ff
@ -58,7 +58,6 @@ namespace ewol {
|
|||||||
int32_t m_uniqueId; //!< Object UniqueID ==> TODO : Check if it use is needed
|
int32_t m_uniqueId; //!< Object UniqueID ==> TODO : Check if it use is needed
|
||||||
etk::VectorType<EventExtGen*> m_externEvent; //!< Generic list of event generation for output link
|
etk::VectorType<EventExtGen*> m_externEvent; //!< Generic list of event generation for output link
|
||||||
etk::VectorType<const char*> m_availlableEventId; //!< List of all event availlable for this widget
|
etk::VectorType<const char*> m_availlableEventId; //!< List of all event availlable for this widget
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
ewol::OObject::OObject(void)
|
ewol::OObject::OObject(void)
|
||||||
{
|
{
|
||||||
m_hasClipping = false;
|
m_hasClipping = false;
|
||||||
// nothing to do ...
|
m_scaling.x = 1.0;
|
||||||
|
m_scaling.y = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,12 +45,14 @@ namespace ewol {
|
|||||||
protected:
|
protected:
|
||||||
bool m_hasClipping;
|
bool m_hasClipping;
|
||||||
clipping_ts m_clipping;
|
clipping_ts m_clipping;
|
||||||
|
coord2D_ts m_scaling; //!< scaling ol the object
|
||||||
public:
|
public:
|
||||||
OObject(void);
|
OObject(void);
|
||||||
virtual ~OObject(void);
|
virtual ~OObject(void);
|
||||||
void clippingSet(clipping_ts clip) {m_clipping = clip; m_hasClipping = true;};
|
void clippingSet(clipping_ts clip) {m_clipping = clip; m_hasClipping = true;};
|
||||||
void clippingDisable(void) {m_hasClipping = false;};
|
void clippingDisable(void) {m_hasClipping = false;};
|
||||||
void clippingEnable(void) {m_hasClipping = true;};
|
void clippingEnable(void) {m_hasClipping = true;};
|
||||||
|
void scalingSet(coord2D_ts scale) {m_scaling = scale;};
|
||||||
virtual void Draw(void) = 0;
|
virtual void Draw(void) = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -50,11 +50,12 @@ void ewol::OObject2DColored::Draw(void)
|
|||||||
if (m_coord.Size()<=0) {
|
if (m_coord.Size()<=0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
glPushMatrix();
|
||||||
// Enable Pointers
|
// Enable Pointers
|
||||||
glEnableClientState( GL_VERTEX_ARRAY );
|
glEnableClientState( GL_VERTEX_ARRAY );
|
||||||
glEnableClientState( GL_COLOR_ARRAY );
|
glEnableClientState( GL_COLOR_ARRAY );
|
||||||
|
|
||||||
//glPushMatrix();
|
glScalef(m_scaling.x, m_scaling.y, 1.0);
|
||||||
|
|
||||||
// Set the vertex pointer to our vertex data
|
// Set the vertex pointer to our vertex data
|
||||||
glVertexPointer(2, oglTypeFloat_t, 0, &m_coord[0] );
|
glVertexPointer(2, oglTypeFloat_t, 0, &m_coord[0] );
|
||||||
@ -67,6 +68,7 @@ void ewol::OObject2DColored::Draw(void)
|
|||||||
// Disable Pointers
|
// Disable Pointers
|
||||||
glDisableClientState( GL_COLOR_ARRAY );
|
glDisableClientState( GL_COLOR_ARRAY );
|
||||||
glDisableClientState( GL_VERTEX_ARRAY );
|
glDisableClientState( GL_VERTEX_ARRAY );
|
||||||
|
glPopMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user