|
Raylib C++
1.0.0
Encapsulates the raylib library
|
Encapsulation of the raylib text. More...
#include <RlText.hpp>

Public Member Functions | |
| RlText (const std::string &text, const Vector2f &position={0, 0}, const RlColor &color=RlColor::Black) | |
| RlText constructor (default font used) More... | |
| RlText (const std::string &text, std::shared_ptr< RlFont > &font, const Vector2f &position={0, 0}, const RlColor &color=RlColor::Black) | |
| RlText constructor. More... | |
| RlText (const std::string &text, const std::string &fontPath, float fontSize=20, const Vector2f &position={0, 0}, const RlColor &color=RlColor::Black) | |
| RlText constructor. More... | |
| void | setText (const std::string &text) |
| Set the text to use. More... | |
| void | setFont (const std::shared_ptr< RlFont > &font) |
| Set the font to use. More... | |
| void | setPosition (float x, float y) |
| Set the position of the text. More... | |
| void | setPosition (const Vector2f &pos) |
| Set the position of the text. More... | |
| void | setColor (const RlColor &color) |
| Set the color of the text. More... | |
| const std::string & | getText () const |
| Get the text. More... | |
| const std::shared_ptr< RlFont > & | getFont () const |
| Get the font. More... | |
| const Vector2f & | getPosition () const |
| Get the position of the text. More... | |
| const RlColor & | getColor () const |
| Get the color of the text. More... | |
| float | getWidth () const |
| Get the width of the text with the loaded font. More... | |
| float | getTextSpacing () const |
| Get the text spacing. More... | |
| Vector2f | getSize () const |
| Get the size of the text with the loaded font. More... | |
| void | setTextSpacing (float textSpacing) |
| Set the text spacing. More... | |
| float | getFontSize () const |
| Get the height of the text with the loaded font. More... | |
| void | setFontSize (float fontSize) |
| Set the font size. More... | |
| void | setRotation (float rotation) |
| Set the text rotation. More... | |
| float | getRotation () const |
| Get the text rotation. More... | |
| const Vector2f & | getOrigin () const |
| Get the text origin. More... | |
| void | setOrigin (const Vector2f &origin) |
| Set the text origin. More... | |
Encapsulation of the raylib text.
|
explicit |
RlText constructor (default font used)
| text | the text to use |
| position | the position of the text |
| color | the color of the text |

|
explicit |
RlText constructor.
| text | the text to use |
| font | the font to use |
| position | the position of the text |
| color | the color of the text |
|
explicit |
RlText constructor.
| text | the text to use |
| fontPath | the path to the font to use |
| fontSize | the size of the font to use |
| position | the position of the text |
| color | the color of the text |
| const RlColor & raylib::text::RlText::getColor | ( | ) | const |
Get the color of the text.

| const std::shared_ptr< raylib::text::RlFont > & raylib::text::RlText::getFont | ( | ) | const |
Get the font.

| float raylib::text::RlText::getFontSize | ( | ) | const |
Get the height of the text with the loaded font.

| const Vector2f & raylib::text::RlText::getOrigin | ( | ) | const |
Get the text origin.

| const Vector2f & raylib::text::RlText::getPosition | ( | ) | const |
Get the position of the text.

| float raylib::text::RlText::getRotation | ( | ) | const |
Get the text rotation.

| Vector2f raylib::text::RlText::getSize | ( | ) | const |
Get the size of the text with the loaded font.

| const std::string & raylib::text::RlText::getText | ( | ) | const |
Get the text.

| float raylib::text::RlText::getTextSpacing | ( | ) | const |
Get the text spacing.

| float raylib::text::RlText::getWidth | ( | ) | const |
Get the width of the text with the loaded font.
| void raylib::text::RlText::setColor | ( | const RlColor & | color | ) |
Set the color of the text.
| color | the color of the text |
| void raylib::text::RlText::setFont | ( | const std::shared_ptr< RlFont > & | font | ) |
Set the font to use.
| font | the font to use |
| void raylib::text::RlText::setFontSize | ( | float | fontSize | ) |
Set the font size.
| fontSize | the font size |

| void raylib::text::RlText::setOrigin | ( | const Vector2f & | origin | ) |
Set the text origin.
| origin | the text origin |

| void raylib::text::RlText::setPosition | ( | const Vector2f & | pos | ) |
Set the position of the text.
| pos | the position of the text |
| void raylib::text::RlText::setPosition | ( | float | x, |
| float | y | ||
| ) |
Set the position of the text.
| x | the x position |
| y | the position of the text |
| void raylib::text::RlText::setRotation | ( | float | rotation | ) |
Set the text rotation.
| rotation | the text rotation |

| void raylib::text::RlText::setText | ( | const std::string & | text | ) |
Set the text to use.
| text | the text to use |
| void raylib::text::RlText::setTextSpacing | ( | float | textSpacing | ) |
Set the text spacing.
| textSpacing |

1.8.17