Class: ewol::Drawing


Synopsis:

+                Drawing           (void);
+ ~Drawing (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 setColorBg (const etk::Color<> & _color);
+ void setClippingWidth (const vec3 & _pos,
const vec3 & _width);
+ void setClippingWidth (const vec2 & _pos,
const vec2 & _width);
+ void setClipping (const vec3 & _pos,
const vec3 & _posEnd);
+ void setClipping (const vec2 & _pos,
const vec2 & _posEnd);
+ void setClippingMode (bool _newMode);
+ void setThickness (float _thickness);
+ void addVertex (void);
+ void lineTo (const vec3 & _dest);
+ void lineTo (const vec2 & _dest);
+ void lineRel (const vec3 & _vect);
+ void lineRel (const vec2 & _vect);
+ void rectangle (const vec3 & _dest);
+ void rectangle (const vec2 & _dest);
+ void rectangleWidth (const vec3 & _size);
+ void rectangleWidth (const vec2 & _size);
+ void cube (const vec3 & _dest);
+ void circle (float _radius,
float _angleStart,
float _angleStop);
- void loadProgram (void);
- void unLoadProgram (void);
- void generateTriangle (void);
- void resetCount (void);
- void internalSetColor (const etk::Color<> & _color);
- void setPoint (const vec3 & point);

Object Hierarchy:

ewol::Compositing
    +--> ewol::Drawing

Detail:

ewol::Drawing ()

Drawing(void);

Basic constructor


ewol::~Drawing ()

~Drawing(void);

Basic 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


setColorBg ()

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

set the background color of the font (for selected Text (not the global BG))


setClippingWidth ()

void setClippingWidth(const vec3 & _pos,
                      const 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,
                 const 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


setThickness ()

void setThickness(float _thickness);

Specify the line thickness for the next elements


addVertex ()

void addVertex(void);

add a point reference at the current position (this is a vertex reference at the current position


lineTo ()

void lineTo(const vec3 & _dest);

draw a line to a specific position


lineTo ()

void lineTo(const vec2 & _dest);



lineRel ()

void lineRel(const vec3 & _vect);

Relative drawing a line (spacial vector)


lineRel ()

void lineRel(const vec2 & _vect);



rectangle ()

void rectangle(const vec3 & _dest);

draw a 2D rectangle to the position requested.


rectangle ()

void rectangle(const vec2 & _dest);



rectangleWidth ()

void rectangleWidth(const vec3 & _size);

draw a 2D rectangle to the requested size.


rectangleWidth ()

void rectangleWidth(const vec2 & _size);



cube ()

void cube(const vec3 & _dest);

draw a 3D rectangle to the position requested.


circle ()

void circle(float _radius,
            float _angleStart,
            float _angleStop);

draw a 2D circle with the specify rafdius parameter.


loadProgram ()

void loadProgram(void);

load the openGL program and get all the ID needed


unLoadProgram ()

void unLoadProgram(void);

Un-Load the openGL program and get all the ID needed


generateTriangle ()

void generateTriangle(void);

Lunch the generation of triangle


resetCount ()

void resetCount(void);

in case of some error the count can be reset


internalSetColor ()

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

set the Color of the current triangle drawing


setPoint ()

void setPoint(const vec3 & point);

internal add of the specific point