From b55418effd288d9989b86d34831c8d60a5c6c7a7 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Wed, 11 Aug 2021 18:31:56 +0200 Subject: ADDED: DrawTextPro() with text rotation support --- src/text.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/text.c') 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) -- cgit v1.2.3