Raylib C++  1.0.0
Encapsulates the raylib library
Static Public Member Functions | List of all members
raylib::helper::draw::DrawTextHelper Class Reference

Helper class for drawing text. More...

#include <DrawTextHelper.hpp>

Collaboration diagram for raylib::helper::draw::DrawTextHelper:
Collaboration graph

Static Public Member Functions

static void drawFps (const Vector2f &pos={10, 10}, const int &fontSize=20)
 Draw the current fps. More...
 
static void drawFps (const float &posX=10, const float &posY=10, const int &fontSize=20)
 Draw the current fps. More...
 
static void drawFps (const Vector2f &pos={10, 10})
 Draw the fps. More...
 
static void drawFps (const int &posX=10, const int &posY=10)
 Draw the fps. More...
 
static void drawText (const std::string &text, const Vector2f &pos, const int &fontSize, const RlColor &color=RlColor::Black)
 Draw a text (using default font) More...
 
static void drawText (const std::string &text, const float &posX, const float &posY, const int &fontSize, const RlColor &color=RlColor::Black)
 Draw a text (using default font) More...
 
static void drawText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const RlColor &color=RlColor::Black)
 Draw text using font and additional parameters. More...
 
static void drawText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const float &fontSize, const RlColor &tint=RlColor::Black, const float &spacing=1)
 Draw text using font and additional parameters. More...
 
static void drawText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const float &rotation, const float &fontSize, const RlColor &tint=RlColor::Black, const float &spacing=1)
 Draw text using font and additional parameters. More...
 
static void drawText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const Vector2f &origin, const float &fontSize, const RlColor &tint=RlColor::Black, const float &spacing=1)
 Draw text using font and additional parameters. More...
 
static void drawText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const Vector2f &origin, const float &rotation, const float &fontSize=20, const RlColor &tint=RlColor::Black, const float &spacing=1)
 Draw text using Font and 'pro' parameters (rotation) More...
 
static void drawCenteredText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const RlColor &color=RlColor::Black, const float &spacing=1)
 Draw a text centered to the position. More...
 
static void drawCenteredText (const std::string &text, const raylib::text::RlFont &font, const Vector2f &position, const float &fontSize, const RlColor &color=RlColor::Black, const float &spacing=1)
 Draw a text centered to the position. More...
 
static void drawCenteredText (const raylib::text::RlText &text)
 Draw a text centered to the position of the text. More...
 
static void drawTextUsingCodepoint (const raylib::text::RlFont &font, const int &codepoint, const Vector2f &position, float fontSize, const RlColor &tint)
 Draw one character (codepoint) More...
 
static void drawText (const raylib::text::RlText &text, const Vector2f &position, const RlColor &color=RlColor::Black)
 Draw text using RlText and additional parameters. More...
 
static void drawText (const raylib::text::RlText &text, const float &posX, const float &posY, const RlColor &color=RlColor::Black)
 Draw text using RlText and additional parameters. More...
 
static void drawText (const raylib::text::RlText &text)
 Draw text using RlText values. More...
 

Detailed Description

Helper class for drawing text.

Member Function Documentation

◆ drawCenteredText() [1/3]

void raylib::helper::draw::DrawTextHelper::drawCenteredText ( const raylib::text::RlText text)
static

Draw a text centered to the position of the text.

Parameters
textthe text to draw
Here is the call graph for this function:

◆ drawCenteredText() [2/3]

void raylib::helper::draw::DrawTextHelper::drawCenteredText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const float &  fontSize,
const RlColor color = RlColor::Black,
const float &  spacing = 1 
)
static

Draw a text centered to the position.

Parameters
textthe text to draw
fontthe font
positionthe position
fontSizethe font size
colorthe color
spacingthe spacing
Here is the call graph for this function:

◆ drawCenteredText() [3/3]

void raylib::helper::draw::DrawTextHelper::drawCenteredText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const RlColor color = RlColor::Black,
const float &  spacing = 1 
)
static

Draw a text centered to the position.

Parameters
textthe text to draw
fontthe font
positionthe position
colorthe color
spacingthe spacing
Here is the call graph for this function:

◆ drawFps() [1/4]

void raylib::helper::draw::DrawTextHelper::drawFps ( const float &  posX = 10,
const float &  posY = 10,
const int &  fontSize = 20 
)
static

Draw the current fps.

Parameters
posXthe position x
posYthe position y
fontSizethe font size

◆ drawFps() [2/4]

void raylib::helper::draw::DrawTextHelper::drawFps ( const int &  posX = 10,
const int &  posY = 10 
)
static

Draw the fps.

Parameters
posXthe position x
posYthe position y

◆ drawFps() [3/4]

void raylib::helper::draw::DrawTextHelper::drawFps ( const Vector2f pos = {10, 10})
static

Draw the fps.

Parameters
posthe position

◆ drawFps() [4/4]

void raylib::helper::draw::DrawTextHelper::drawFps ( const Vector2f pos = {10, 10},
const int &  fontSize = 20 
)
static

Draw the current fps.

Parameters
posthe position
fontSizethe font size
Here is the caller graph for this function:

◆ drawText() [1/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const raylib::text::RlText text)
static

Draw text using RlText values.

Parameters
textthe text to draw
Here is the call graph for this function:

◆ drawText() [2/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const raylib::text::RlText text,
const float &  posX,
const float &  posY,
const RlColor color = RlColor::Black 
)
static

Draw text using RlText and additional parameters.

Parameters
textthe text to draw
posXthe x position
posYthe y position
colorthe color
Here is the call graph for this function:

◆ drawText() [3/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const raylib::text::RlText text,
const Vector2f position,
const RlColor color = RlColor::Black 
)
static

Draw text using RlText and additional parameters.

Parameters
textthe text to draw
positionthe position
colorthe color
Here is the call graph for this function:

◆ drawText() [4/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const float &  posX,
const float &  posY,
const int &  fontSize,
const RlColor color = RlColor::Black 
)
static

Draw a text (using default font)

Parameters
textthe text to draw
posXthe x position
posYthe y position
fontSizethe font size
colorthe color
Here is the call graph for this function:

◆ drawText() [5/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const float &  fontSize,
const RlColor tint = RlColor::Black,
const float &  spacing = 1 
)
static

Draw text using font and additional parameters.

Parameters
fontthe font
textthe text to draw
positionthe position
fontSizethe font size
spacingthe spacing
tintthe color

◆ drawText() [6/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const float &  rotation,
const float &  fontSize,
const RlColor tint = RlColor::Black,
const float &  spacing = 1 
)
static

Draw text using font and additional parameters.

Parameters
textthe text to draw
fontthe font
positionthe position
rotationthe rotation
fontSizethe font size
tintthe color
spacingthe spacing

◆ drawText() [7/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const RlColor color = RlColor::Black 
)
static

Draw text using font and additional parameters.

Parameters
fontthe font
textthe text to draw
positionthe position
colorthe color
Here is the call graph for this function:

◆ drawText() [8/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const Vector2f origin,
const float &  fontSize,
const RlColor tint = RlColor::Black,
const float &  spacing = 1 
)
static

Draw text using font and additional parameters.

Parameters
textthe text to draw
fontthe font
positionthe position
originthe origin
fontSizethe font size
tintthe color
spacingthe spacing

◆ drawText() [9/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const raylib::text::RlFont font,
const Vector2f position,
const Vector2f origin,
const float &  rotation,
const float &  fontSize = 20,
const RlColor tint = RlColor::Black,
const float &  spacing = 1 
)
static

Draw text using Font and 'pro' parameters (rotation)

Parameters
fontthe font
textthe text to draw
positionthe position
originthe origin
rotationthe rotation
fontSizethe font size
spacingthe spacing
tintthe color
Here is the call graph for this function:

◆ drawText() [10/10]

void raylib::helper::draw::DrawTextHelper::drawText ( const std::string &  text,
const Vector2f pos,
const int &  fontSize,
const RlColor color = RlColor::Black 
)
static

Draw a text (using default font)

Parameters
textthe text to draw
posthe position
fontSizethe font size
colorthe color
Here is the caller graph for this function:

◆ drawTextUsingCodepoint()

void raylib::helper::draw::DrawTextHelper::drawTextUsingCodepoint ( const raylib::text::RlFont font,
const int &  codepoint,
const Vector2f position,
float  fontSize,
const RlColor tint 
)
static

Draw one character (codepoint)

Parameters
fontthe font
codepointthe codepoint
positionthe position
fontSizethe font size
tintthe color
Here is the call graph for this function:

The documentation for this class was generated from the following files: