ewol::compositing::Image Class Reference
Inheritance diagram for ewol::compositing::Image:
ewol::Compositing ewol::compositing::Sprite

Public Member Functions

 Image (const std::string &_imageName="", bool _df=false, int32_t _size=ewol::compositing::Image::sizeAuto)
 
virtual ~Image ()
 
void draw (bool _disableDepthTest=true)
 
void clear ()
 
const vec3getPos ()
 
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=32)
 
void setSource (const std::string &_newFile, const vec2 &_size)
 
bool hasSources ()
 
vec2 getRealSize ()
 
void setDistanceFieldMode (bool _mode)
 
bool getDistanceFieldMode () const
 
- Public Member Functions inherited from ewol::Compositing
 Compositing ()
 
virtual ~Compositing ()
 
virtual void resetMatrix ()
 
virtual void translate (const vec3 &_vect)
 
virtual void rotate (const vec3 &_vect, float _angle)
 
virtual void scale (const vec3 &_vect)
 
virtual void setMatrix (const mat4 &_mat)
 

Static Public Attributes

static const int32_t sizeAuto
 

Additional Inherited Members

- Protected Attributes inherited from ewol::Compositing
mat4 m_matrixApply
 

Constructor & Destructor Documentation

§ Image()

ewol::compositing::Image::Image ( const std::string &  _imageName = "",
bool  _df = false,
int32_t  _size = ewol::compositing::Image::sizeAuto 
)

generic constructor

Parameters
[in]_imageNameName of the file that might be loaded
[in]_dfenable distance field mode
[in]_sizefor the image when Verctorial image loading is requested

§ ~Image()

virtual ewol::compositing::Image::~Image ( )
virtual

generic destructor

Member Function Documentation

§ clear()

void ewol::compositing::Image::clear ( )
virtual

clear alll tre registered element in the current element

Reimplemented from ewol::Compositing.

§ draw()

void ewol::compositing::Image::draw ( bool  _disableDepthTest = true)
virtual

draw All the refistered text in the current element on openGL

Parameters
[in]_disableDepthTestdisable the Depth test for display

Implements ewol::Compositing.

§ getDistanceFieldMode()

bool ewol::compositing::Image::getDistanceFieldMode ( ) const
inline

Get the render methode.

Returns
The render mode of the image.

§ getPos()

const vec3& ewol::compositing::Image::getPos ( )
inline

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

Returns
the current position.

§ getRealSize()

vec2 ewol::compositing::Image::getRealSize ( )

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

Returns
tre image registered size

§ hasSources()

bool ewol::compositing::Image::hasSources ( )

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

Returns
the validity od the resources.

§ print()

void ewol::compositing::Image::print ( const ivec2 _size)
inline

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

Parameters
[in]_sizesize of the output image

§ printPart()

void ewol::compositing::Image::printPart ( const vec2 _size,
const vec2 _sourcePosStart,
const vec2 _sourcePosStop 
)

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

Parameters
[in]_sizesize of the output image
[in]_sourcePosStartStart position in the image [0..1] (can be bigger but this repeate the image).
[in]_sourcePosStopStop position in the image [0..1] (can be bigger but this repeate the image).

§ setAngle()

void ewol::compositing::Image::setAngle ( float  _angleRad)

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

Parameters
[in]_angleAngle to set in radiant.

§ setClipping()

void ewol::compositing::Image::setClipping ( const vec3 _pos,
vec3  _posEnd 
)

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

Parameters
[in]_posStart position of the clipping
[in]_posEndEnd position of the clipping

§ setClippingMode()

void ewol::compositing::Image::setClippingMode ( bool  _newMode)
inline

enable/Disable the clipping (without lose the current clipping position)

_newMode The new status of the clipping

§ setClippingWidth()

void ewol::compositing::Image::setClippingWidth ( const vec3 _pos,
vec3  _width 
)
inline

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

Parameters
[in]_posStart position of the clipping
[in]_widthWidth size of the clipping

§ setColor()

void ewol::compositing::Image::setColor ( const etk::Color<> &  _color)
inline

set the Color of the current foreground font

Parameters
[in]_colorColor to set on foreground (for next print)

§ setDistanceFieldMode()

void ewol::compositing::Image::setDistanceFieldMode ( bool  _mode)

Set render mode of the image.

Parameters
[in]_modeActivation of distance field mode

§ setPos()

void ewol::compositing::Image::setPos ( const vec3 _pos)
inline

set position for the next text writen

Parameters
[in]_posPosition of the text (in 3D)

§ setRelPos()

void ewol::compositing::Image::setRelPos ( const vec3 _pos)
inline

set relative position for the next text writen

Parameters
[in]_posofset apply of the text (in 3D)

§ setSource()

void ewol::compositing::Image::setSource ( const std::string &  _newFile,
int32_t  _size = 32 
)
inline

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

Parameters
[in]_newFileNew file of the Image
[in]_sizefor the image when Verctorial image loading is requested

The documentation for this class was generated from the following file:
  • framework/atria-soft/ewol/ewol/compositing/Image.hpp