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
Parameter [input]: _imageName Name of the file that might be loaded
ewol::~Image ()
~Image(void);
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(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)
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(void);
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(void);
get the source image registered size in the file (<0 when multiple size image)
Return: tre image registered size
loadProgram ()
void loadProgram(void);
load the openGL program and get all the ID needed
ewol::Image ()
Image(const std::string & _imageName);
generic constructor
-
Parameter [input]: _imageName Name of the file that might be loaded
ewol::~Image ()
~Image(void);
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(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)
-
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(void);
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(void);
get the source image registered size in the file (<0 when multiple size image)
-
Return: tre image registered size
loadProgram ()
void loadProgram(void);
load the openGL program and get all the ID needed