瀏覽代碼

TODO: DrawTextPro() rotation not working?

pull/1919/head
raysan5 3 年之前
父節點
當前提交
7e27c2ffa8
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      src/text.c

+ 5
- 2
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) // 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) void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint)
{ {
// TODO: Not working... why???
rlPushMatrix(); rlPushMatrix();
rlTranslatef(origin.x, origin.y, 0.0f);
o">//rlTranslatef(position.x, position.y, 0.0f);
rlRotatef(rotation, 0.0f, 0.0f, 1.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, p">(Vector2){ position.x, position.y }, fontSize, spacing, tint);
rlPopMatrix(); rlPopMatrix();
} }

Loading…
取消
儲存