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
Parameter [input]: _imageName Name of the file that might be loaded
Parameter [input]: _df enable distance field mode
~Image
+ virtual ~Image ();
generic destructor
draw
+ void draw (bool _disableDepthTest);
draw All the refistered text in the current element on openGL
Parameter [input]: _disableDepthTest disable the Depth test for display
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)
Return: the current position.
setPos
+ void setPos (const vec3 & _pos);
set position for the next text writen
Parameter [input]: _pos Position of the text (in 3D)
setPos
+ void setPos (const vec2 & _pos);
setRelPos
+ void setRelPos (const vec3 & _pos);
set relative position for the next text writen
Parameter [input]: _pos ofset apply of the text (in 3D)
setRelPos
+ void setRelPos (const vec2 & _pos);
setColor
+ void setColor (const etk::Color<> & _color);
set the Color of the current foreground font
Parameter [input]: _color Color to set on foreground (for next print)
setClippingWidth
+ void setClippingWidth (const vec3 & _pos,
vec3 _width);
Request a clipping area for the text (next draw only)
Parameter [input]: _pos Start position of the clipping
Parameter [input]: _width Width size of the clipping
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)
Parameter [input]: _pos Start position of the clipping
Parameter [input]: _posEnd End position of the clipping
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)
Parameter [input]: _angle Angle to set in radiant.
print
+ void print (const ivec2 & _size);
add a compleate of the image to display with the requested size
Parameter [input]: _size size of the output image
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
Parameter [input]: _size size of the output image
Parameter [input]: _sourcePosStart Start position in the image [0..1] (can be bigger but this repeate the image).
Parameter [input]: _sourcePosStop Stop position in the image [0..1] (can be bigger but this repeate the image).
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 ...
Parameter [input]: _newFile New file of the Image
Parameter [input]: _size for the image when Verctorial image loading is requested
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 ..
Return: the validity od the resources.
getRealSize
+ vec2 getRealSize ();
get the source image registered size in the file (<0 when multiple size image)
Return: tre image registered size
setDistanceFieldMode
+ void setDistanceFieldMode (bool _mode);
Set render mode of the image
Parameter [input]: _mode Activation of distance field mode
getDistanceFieldMode
+ bool getDistanceFieldMode () const;
Get the render methode.
Return: The render mode of the image.
+ewol::Compositing
+--> ewol::compositing::Image
+--> ewol::compositing::Sprite
Detail:
Image
+ Image (const std::string & _imageName,generic constructor
bool _df);
Parameter [input]: | _imageName | Name of the file that might be loaded | Parameter [input]: | _df | enable distance field mode |
~Image
+ virtual ~Image ();generic destructor
draw
+ void draw (bool _disableDepthTest);draw All the refistered text in the current element on openGL
Parameter [input]: | _disableDepthTest | disable the Depth test for display |
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)
Return: | the current position. |
setPos
+ void setPos (const vec3 & _pos);set position for the next text writen
Parameter [input]: | _pos | Position of the text (in 3D) |
setPos
+ void setPos (const vec2 & _pos);
setRelPos
+ void setRelPos (const vec3 & _pos);set relative position for the next text writen
Parameter [input]: | _pos | ofset apply of the text (in 3D) |
setRelPos
+ void setRelPos (const vec2 & _pos);
setColor
+ void setColor (const etk::Color<> & _color);set the Color of the current foreground font
Parameter [input]: | _color | Color to set on foreground (for next print) |
setClippingWidth
+ void setClippingWidth (const vec3 & _pos,Request a clipping area for the text (next draw only)
vec3 _width);
Parameter [input]: | _pos | Start position of the clipping | Parameter [input]: | _width | Width size of the clipping |
setClippingWidth
+ void setClippingWidth (const vec2 & _pos,
const vec2 & _width);
setClipping
+ void setClipping (const vec3 & _pos,Request a clipping area for the text (next draw only)
vec3 _posEnd);
Parameter [input]: | _pos | Start position of the clipping | Parameter [input]: | _posEnd | End position of the clipping |
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)
Parameter [input]: | _angle | Angle to set in radiant. |
+ void print (const ivec2 & _size);add a compleate of the image to display with the requested size
Parameter [input]: | _size | size of the output image |
+ void print (const vec2 & _size);
printPart
+ void printPart (const vec2 & _size,add a part of the image to display with the requested size
const vec2 & _sourcePosStart,
const vec2 & _sourcePosStop);
Parameter [input]: | _size | size of the output image | Parameter [input]: | _sourcePosStart | Start position in the image [0..1] (can be bigger but this repeate the image). | Parameter [input]: | _sourcePosStop | Stop position in the image [0..1] (can be bigger but this repeate the image). |
setSource
+ void setSource (const std::string & _newFile,change the image Source == > can not be done to display 2 images at the same time ...
int32_t _size);
Parameter [input]: | _newFile | New file of the Image | Parameter [input]: | _size | for the image when Verctorial image loading is requested |
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 ..
Return: | the validity od the resources. |
getRealSize
+ vec2 getRealSize ();get the source image registered size in the file (<0 when multiple size image)
Return: | tre image registered size |
setDistanceFieldMode
+ void setDistanceFieldMode (bool _mode);Set render mode of the image
Parameter [input]: | _mode | Activation of distance field mode |
getDistanceFieldMode
+ bool getDistanceFieldMode () const;Get the render methode.
Return: | The render mode of the image. |