Visual Servoing Platform
version 3.3.0 under development (2020-02-17)
|
#include <visp3/core/vpFont.h>
Public Member Functions | |
vpFont (unsigned int height=16) | |
~vpFont () | |
bool | drawText (vpImage< unsigned char > &I, const std::string &text, const vpImagePoint &position, unsigned char color) const |
bool | drawText (vpImage< unsigned char > &I, const std::string &text, const vpImagePoint &position, unsigned char color, unsigned char background) const |
bool | drawText (vpImage< vpRGBa > &I, const std::string &text, const vpImagePoint &position, const vpColor &color) const |
bool | drawText (vpImage< vpRGBa > &I, const std::string &text, const vpImagePoint &position, const vpColor &color, const vpColor &background) const |
unsigned int | getHeight () const |
bool | setHeight (unsigned int height) |
Font drawing functions for image.
vpFont::vpFont | ( | unsigned int | height = 16 | ) |
Creates a new Font class with given height.
[in] | height | : Initial font height value in pixels. By default it is equal to 16 pixels. |
Definition at line 1940 of file vpFont.cpp.
vpFont::~vpFont | ( | ) |
Destructor.
Definition at line 1947 of file vpFont.cpp.
bool vpFont::drawText | ( | vpImage< unsigned char > & | I, |
const std::string & | text, | ||
const vpImagePoint & | position, | ||
unsigned char | color | ||
) | const |
Draws a text at the image.
[in,out] | I | : Image where we draw text. |
[in] | text | : A text to draw. |
[in] | position | : A position to draw text. |
[in] | color | : A color of the text. |
Definition at line 1962 of file vpFont.cpp.
bool vpFont::drawText | ( | vpImage< unsigned char > & | I, |
const std::string & | text, | ||
const vpImagePoint & | position, | ||
unsigned char | color, | ||
unsigned char | background | ||
) | const |
Draws a text at the image. Fills the text background by given color.
[in,out] | I | : Image where we draw text. |
[in] | text | : A text to draw. |
[in] | position | : A position to draw text. |
[in] | color | : A color of the text. |
[in] | background | : Background color. |
Definition at line 1979 of file vpFont.cpp.
bool vpFont::drawText | ( | vpImage< vpRGBa > & | I, |
const std::string & | text, | ||
const vpImagePoint & | position, | ||
const vpColor & | color | ||
) | const |
Draws a text at the image.
[in,out] | I | : Image where we draw text. |
[in] | text | : A text to draw. |
[in] | position | : A position to draw text. |
[in] | color | : A color of the text. |
Definition at line 1995 of file vpFont.cpp.
bool vpFont::drawText | ( | vpImage< vpRGBa > & | I, |
const std::string & | text, | ||
const vpImagePoint & | position, | ||
const vpColor & | color, | ||
const vpColor & | background | ||
) | const |
Draws a text at the image. Fills the text background by given color.
[in,out] | I | : Image where we draw text. |
[in] | text | : A text to draw. |
[in] | position | : A position to draw text. |
[in] | color | : A color of the text. |
[in] | background | : Background color. |
Definition at line 2012 of file vpFont.cpp.
unsigned int vpFont::getHeight | ( | ) | const |
Gets height of the font in pixels.
Definition at line 2023 of file vpFont.cpp.
bool vpFont::setHeight | ( | unsigned int | height | ) |
Sets a new height value to font.
[in] | height | : A new height value in pixels. |
Definition at line 2035 of file vpFont.cpp.