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)
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)
setColorBg ()
void setColorBg(const etk::Color<> & _color);
set the background color of the font (for selected Text (not the global BG))
Parameter [input]: _color Color to set on background (for next print)
setClippingWidth ()
void setClippingWidth(const vec3 & _pos,
const vec3 & _width);
Request a clipping area for the text (next draw only)
Parameter [input]: _width Width size of the clipping
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)
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
setThickness ()
void setThickness(float _thickness);
Specify the line thickness for the next elements
Parameter [input]: _thickness The thickness disired for the next print
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
Parameter [input]: _dest Position of the end of the line.
lineTo ()
void lineTo(const vec2 & _dest);
lineRel ()
void lineRel(const vec3 & _vect);
Relative drawing a line (spacial vector)
Parameter [input]: _vect Vector of the curent line.
lineRel ()
void lineRel(const vec2 & _vect);
rectangle ()
void rectangle(const vec3 & _dest);
draw a 2D rectangle to the position requested.
Parameter [input]: _dest Position the the end of the rectangle
rectangle ()
void rectangle(const vec2 & _dest);
rectangleWidth ()
void rectangleWidth(const vec3 & _size);
draw a 2D rectangle to the requested size.
Parameter [input]: _size size of the rectangle
rectangleWidth ()
void rectangleWidth(const vec2 & _size);
cube ()
void cube(const vec3 & _dest);
draw a 3D rectangle to the position requested.
Parameter [input]: _dest Position the the end of the rectangle
circle ()
void circle(float _radius,
float _angleStart,
float _angleStop);
draw a 2D circle with the specify rafdius parameter.
Parameter [input]: _radius Distence to the dorder
Parameter [input]: _angleStart start angle of this circle ([0..2PI] otherwithe == > disable)
Parameter [input]: _angleStop stop angle of this circle ([0..2PI] otherwithe == > disable)
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
Parameter [input]: _color Color to current dots generated
setPoint ()
void setPoint(const vec3 & point);
internal add of the specific point
Parameter [input]: _point The requeste dpoint to add
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)
-
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)
setColorBg ()
void setColorBg(const etk::Color<> & _color);
set the background color of the font (for selected Text (not the global BG))
-
Parameter [input]: _color Color to set on background (for next print)
setClippingWidth ()
void setClippingWidth(const vec3 & _pos, const vec3 & _width);
Request a clipping area for the text (next draw only)
-
Parameter [input]: _width Width size of the clipping
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)
-
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
setThickness ()
void setThickness(float _thickness);
Specify the line thickness for the next elements
-
Parameter [input]: _thickness The thickness disired for the next print
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
-
Parameter [input]: _dest Position of the end of the line.
lineTo ()
void lineTo(const vec2 & _dest);
lineRel ()
void lineRel(const vec3 & _vect);
Relative drawing a line (spacial vector)
-
Parameter [input]: _vect Vector of the curent line.
lineRel ()
void lineRel(const vec2 & _vect);
rectangle ()
void rectangle(const vec3 & _dest);
draw a 2D rectangle to the position requested.
-
Parameter [input]: _dest Position the the end of the rectangle
rectangle ()
void rectangle(const vec2 & _dest);
rectangleWidth ()
void rectangleWidth(const vec3 & _size);
draw a 2D rectangle to the requested size.
-
Parameter [input]: _size size of the rectangle
rectangleWidth ()
void rectangleWidth(const vec2 & _size);
cube ()
void cube(const vec3 & _dest);
draw a 3D rectangle to the position requested.
-
Parameter [input]: _dest Position the the end of the rectangle
circle ()
void circle(float _radius, float _angleStart, float _angleStop);
draw a 2D circle with the specify rafdius parameter.
-
Parameter [input]: _radius Distence to the dorder
Parameter [input]: _angleStart start angle of this circle ([0..2PI] otherwithe == > disable)
Parameter [input]: _angleStop stop angle of this circle ([0..2PI] otherwithe == > disable)
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
-
Parameter [input]: _color Color to current dots generated
setPoint ()
void setPoint(const vec3 & point);
internal add of the specific point
-
Parameter [input]: _point The requeste dpoint to add