ADDED: DrawTextPro() with text rotation support
This commit is contained in:
parent
5a259fa10f
commit
b55418effd
2 changed files with 12 additions and 1 deletions
10
src/text.c
10
src/text.c
|
|
@ -890,7 +890,17 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, f
|
|||
}
|
||||
}
|
||||
|
||||
// Draw text using Font and pro parameters (rotation)
|
||||
void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint)
|
||||
{
|
||||
rlPushMatrix();
|
||||
|
||||
rlTranslatef(origin.x, origin.y, 0.0f);
|
||||
rlRotatef(rotation, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
DrawTextEx(font, text, position, fontSize, spacing, tint);
|
||||
|
||||
rlPopMatrix();
|
||||
}
|
||||
|
||||
// Draw one character (codepoint)
|
||||
|
|
|
|||
Loading…
Reference in a new issue