summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-08-11 18:31:56 +0200
committerraysan5 <[email protected]>2021-08-11 18:31:56 +0200
commitb55418effd288d9989b86d34831c8d60a5c6c7a7 (patch)
treec94a0c0a50b3228bcdda2d02b691fce8de7b12c2 /src/text.c
parent5a259fa10ffb1ad44528d2678d3781cddd0bb1c0 (diff)
downloadraylib-b55418effd288d9989b86d34831c8d60a5c6c7a7.tar.gz
raylib-b55418effd288d9989b86d34831c8d60a5c6c7a7.zip
ADDED: DrawTextPro() with text rotation support
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index f12518f4..d8c3a6b7 100644
--- a/src/text.c
+++ b/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)