class: ewol::compositing::Image


Description:



Constructor and Destructor:

+                                                      Image                (const std::string & _imageName,
bool _df);
+ virtual ~Image ();

Synopsis:

+ void                                         draw                 (bool _disableDepthTest);
+ void clear ();
+ const vec3 & getPos ();
+ 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 ();
+ vec2 getRealSize ();
+ void setDistanceFieldMode (bool _mode);
+ bool getDistanceFieldMode () const;

Object Hierarchy:

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

Detail:

Image

+  Image (const std::string & _imageName,
bool _df);
generic constructor


~Image

+ virtual  ~Image ();
generic destructor


draw

+ void draw (bool _disableDepthTest);
draw All the refistered text in the current element on openGL


clear

+ void clear ();
clear alll tre registered element in the current element


getPos

+ const vec3 & getPos ();
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 ();
Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..


getRealSize

+ vec2 getRealSize ();
get the source image registered size in the file (<0 when multiple size image)


setDistanceFieldMode

+ void setDistanceFieldMode (bool _mode);
Set render mode of the image


getDistanceFieldMode

+ bool getDistanceFieldMode () const;
Get the render methode.