summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-08-11 18:53:06 +0200
committerraysan5 <[email protected]>2021-08-11 18:53:06 +0200
commit7e27c2ffa82337c6b4649295b4df1c7e1829c7fc (patch)
tree829175a1bfe258cccf7aeb9a120daefe88ec3191 /src
parentb55418effd288d9989b86d34831c8d60a5c6c7a7 (diff)
downloadraylib-7e27c2ffa82337c6b4649295b4df1c7e1829c7fc.tar.gz
raylib-7e27c2ffa82337c6b4649295b4df1c7e1829c7fc.zip
TODO: DrawTextPro() rotation not working?
Diffstat (limited to 'src')
-rw-r--r--src/text.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/text.c b/src/text.c
index d8c3a6b7..891c5497 100644
--- a/src/text.c
+++ b/src/text.c
@@ -893,12 +893,15 @@ 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)
{
+ // TODO: Not working... why???
+
rlPushMatrix();
- rlTranslatef(origin.x, origin.y, 0.0f);
+ //rlTranslatef(position.x, position.y, 0.0f);
rlRotatef(rotation, 0.0f, 0.0f, 1.0f);
+ rlTranslatef(-origin.x, -origin.y, 0.0f);
- DrawTextEx(font, text, position, fontSize, spacing, tint);
+ DrawTextEx(font, text, (Vector2){ position.x, position.y }, fontSize, spacing, tint);
rlPopMatrix();
}