class: ewol::compositing::TextDF
Description:
Constructor and Destructor:
+ TextDF (const std::string & _fontName,
int32_t _fontSize);
+ virtual ~TextDF ();
Synopsis:
# std::shared_ptr<ewol::resource::DistanceFieldFont> m_fontDF;
# std::vector<float> m_glyphLevel;
# int32_t m_GLglyphLevel;
+ void updateSizeToRender (const vec2 & _size);
+ virtual void clear ();
+ virtual void drawD (bool _disableDepthTest);
+ virtual void drawMT (const mat4 & _transformationMatrix,
bool _enableDepthTest);
# float m_size;
+ virtual float getHeight ();
+ virtual float getSize ();
+ virtual void setSize (float _size);
+ virtual ewol::GlyphProperty* getGlyphPointer (char32_t _charcode);
+ virtual void loadProgram (const std::string & _shaderName);
+ virtual void setFontSize (int32_t _fontSize);
+ virtual void setFontName (const std::string & _fontName);
+ virtual void setFont (std::string _fontName,
int32_t _fontSize);
+ virtual void setFontMode (enum ewol::font::mode _mode);
+ virtual void printChar (const char32_t & _charcode);
+ virtual vec3 calculateSizeChar (const char32_t & _charcode);
Object Hierarchy:
+ewol::Compositing
+--> +ewol::compositing::TextBase
+--> ewol::compositing::TextDF
Detail:
m_fontDF
# std::shared_ptr<ewol::resource::DistanceFieldFont> m_fontDF;
Font resources
m_glyphLevel
# std::vector<float> m_glyphLevel;
Level of display of the glyph (notmal : 0.50, bold : 0.40, super bold : 0.30 ...)
m_GLglyphLevel
# int32_t m_GLglyphLevel;
openGL Id on the glyph level display
TextDF
+ TextDF (const std::string & _fontName,
int32_t _fontSize);
generic constructor
Parameter [input]: _fontName Name of the font that might be loaded
Parameter [input]: _fontSize size of the font that might be loaded
~TextDF
+ virtual ~TextDF ();
generic destructor
updateSizeToRender
+ void updateSizeToRender (const vec2 & _size);
Calculate size to be at the best size for a render in this special size.
Note: special for Distance field mode.
Parameter [input]: _size request dimention.
clear
+ virtual void clear ();
clear all the registered element in the current element
drawD
+ virtual void drawD (bool _disableDepthTest);
draw All the refistered text in the current element on openGL
drawMT
+ virtual void drawMT (const mat4 & _transformationMatrix,
bool _enableDepthTest);
m_size
# float m_size;
getHeight
+ virtual float getHeight ();
getSize
+ virtual float getSize ();
setSize
+ virtual void setSize (float _size);
getGlyphPointer
+ virtual ewol::GlyphProperty* getGlyphPointer (char32_t _charcode);
loadProgram
+ virtual void loadProgram (const std::string & _shaderName);
load the openGL program and get all the ID needed
setFontSize
+ virtual void setFontSize (int32_t _fontSize);
Specify the font size (this reset the internal element of the current text (system requirement)
Parameter [input]: _fontSize New font size
setFontName
+ virtual void setFontName (const std::string & _fontName);
Specify the font name (this reset the internal element of the current text (system requirement)
Parameter [input]: _fontName Current name of the selected font
setFont
+ virtual void setFont (std::string _fontName,
int32_t _fontSize);
Specify the font property (this reset the internal element of the current text (system requirement)
Parameter [input]: fontName Current name of the selected font
Parameter [input]: fontSize New font size
setFontMode
+ virtual void setFontMode (enum ewol::font::mode _mode);
Specify the font mode for the next @ref print
Parameter [input]: mode The font mode requested
printChar
+ virtual void printChar (const char32_t & _charcode);
display the current char in the current element (note that the kerning is availlable if the position is not changed)
Parameter [input]: _charcode Char that might be dispalyed
calculateSizeChar
+ virtual vec3 calculateSizeChar (const char32_t & _charcode);
+ewol::Compositing
+--> +ewol::compositing::TextBase
+--> ewol::compositing::TextDF
Detail:
m_fontDF
# std::shared_ptr<ewol::resource::DistanceFieldFont> m_fontDF;Font resources
m_glyphLevel
# std::vector<float> m_glyphLevel;Level of display of the glyph (notmal : 0.50, bold : 0.40, super bold : 0.30 ...)
m_GLglyphLevel
# int32_t m_GLglyphLevel;openGL Id on the glyph level display
TextDF
+ TextDF (const std::string & _fontName,generic constructor
int32_t _fontSize);
Parameter [input]: | _fontName | Name of the font that might be loaded | Parameter [input]: | _fontSize | size of the font that might be loaded |
~TextDF
+ virtual ~TextDF ();generic destructor
updateSizeToRender
+ void updateSizeToRender (const vec2 & _size);Calculate size to be at the best size for a render in this special size.
Note: special for Distance field mode.
Parameter [input]: | _size | request dimention. |
clear
+ virtual void clear ();clear all the registered element in the current element
drawD
+ virtual void drawD (bool _disableDepthTest);draw All the refistered text in the current element on openGL
drawMT
+ virtual void drawMT (const mat4 & _transformationMatrix,
bool _enableDepthTest);
m_size
# float m_size;
getHeight
+ virtual float getHeight ();
getSize
+ virtual float getSize ();
setSize
+ virtual void setSize (float _size);
getGlyphPointer
+ virtual ewol::GlyphProperty* getGlyphPointer (char32_t _charcode);
loadProgram
+ virtual void loadProgram (const std::string & _shaderName);load the openGL program and get all the ID needed
setFontSize
+ virtual void setFontSize (int32_t _fontSize);Specify the font size (this reset the internal element of the current text (system requirement)
Parameter [input]: | _fontSize | New font size |
setFontName
+ virtual void setFontName (const std::string & _fontName);Specify the font name (this reset the internal element of the current text (system requirement)
Parameter [input]: | _fontName | Current name of the selected font |
setFont
+ virtual void setFont (std::string _fontName,Specify the font property (this reset the internal element of the current text (system requirement)
int32_t _fontSize);
Parameter [input]: | fontName | Current name of the selected font | Parameter [input]: | fontSize | New font size |
setFontMode
+ virtual void setFontMode (enum ewol::font::mode _mode);Specify the font mode for the next @ref print
Parameter [input]: | mode | The font mode requested |
printChar
+ virtual void printChar (const char32_t & _charcode);display the current char in the current element (note that the kerning is availlable if the position is not changed)
Parameter [input]: | _charcode | Char that might be dispalyed |
calculateSizeChar
+ virtual vec3 calculateSizeChar (const char32_t & _charcode);