Class: ewol::Image


Synopsis:

+                Image             (const std::string & _imageName);
+ ~Image (void);
+ void draw (bool _disableDepthTest);
+ void clear (void);
+ const vec3 & getPos (void);
+ void setPos (const vec3 & _pos);
+ void setPos (const vec2 & _pos);
+ void setRelPos (const vec3 & _pos);
+ void setRelPos (const vec2 & _pos);
+ void setColor (const etk::Color<> & _color);
+ void setClippingWidth (const vec3 & _pos,
vec3 _width);
+ void setClippingWidth (const vec2 & _pos,
const vec2 & _width);
+ void setClipping (const vec3 & _pos,
vec3 _posEnd);
+ void setClipping (const vec2 & _pos,
const vec2 & _posEnd);
+ void setClippingMode (bool _newMode);
+ void setAngle (float _angleRad);
+ void print (const ivec2 & _size);
+ void print (const vec2 & _size);
+ void printPart (const vec2 & _size,
const vec2 & _sourcePosStart,
const vec2 & _sourcePosStop);
+ void setSource (const std::string & _newFile,
int32_t _size);
+ void setSource (const std::string & _newFile,
const vec2 & _size);
+ bool hasSources (void);
+ vec2 getRealSize (void);
- void loadProgram (void);

Object Hierarchy:

ewol::Compositing
    +--> ewol::Image
        +--> ewol::Sprite

Detail:

ewol::Image ()

Image(const std::string & _imageName);

generic constructor


ewol::~Image ()

~Image(void);

generic destructor


draw ()

void draw(bool _disableDepthTest);

draw All the refistered text in the current element on openGL


clear ()

void clear(void);

clear alll tre registered element in the current element


getPos ()

const vec3 & getPos(void);

get the current display position (sometime needed in the gui control)


setPos ()

void setPos(const vec3 & _pos);

set position for the next text writen


setPos ()

void setPos(const vec2 & _pos);



setRelPos ()

void setRelPos(const vec3 & _pos);

set relative position for the next text writen


setRelPos ()

void setRelPos(const vec2 & _pos);



setColor ()

void setColor(const etk::Color<> & _color);

set the Color of the current foreground font


setClippingWidth ()

void setClippingWidth(const vec3 & _pos,
                      vec3 _width);

Request a clipping area for the text (next draw only)


setClippingWidth ()

void setClippingWidth(const vec2 & _pos,
                      const vec2 & _width);



setClipping ()

void setClipping(const vec3 & _pos,
                 vec3 _posEnd);

Request a clipping area for the text (next draw only)


setClipping ()

void setClipping(const vec2 & _pos,
                 const vec2 & _posEnd);



setClippingMode ()

void setClippingMode(bool _newMode);

enable/Disable the clipping (without lose the current clipping position)
_newMode The new status of the clipping


setAngle ()

void setAngle(float _angleRad);

set a unique rotation of this element (not set in the rotate Generic system)


print ()

void print(const ivec2 & _size);

add a compleate of the image to display with the requested size


print ()

void print(const vec2 & _size);



printPart ()

void printPart(const vec2 & _size,
               const vec2 & _sourcePosStart,
               const vec2 & _sourcePosStop);

add a part of the image to display with the requested size


setSource ()

void setSource(const std::string & _newFile,
               int32_t _size);

change the image Source == > can not be done to display 2 images at the same time ...


setSource ()

void setSource(const std::string & _newFile,
               const vec2 & _size);



hasSources ()

bool hasSources(void);

Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..


getRealSize ()

vec2 getRealSize(void);

get the source image registered size in the file (<0 when multiple size image)


loadProgram ()

void loadProgram(void);

load the openGL program and get all the ID needed