diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-08-27 18:39:38 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-08-27 18:39:38 -0400 |
commit | cd9a3d80d8443b4e9a2fbab8f15235fd91e69052 (patch) | |
tree | 541cecc4b435294c4a3ca0d566d1dd57c64be0be /2d/font.scm | |
parent | 5841889f53465b4096830f3778b209063e1fe8bc (diff) |
Add procedures to perform a gl-translate or gl-scale given a vector2 object.
Diffstat (limited to '2d/font.scm')
-rw-r--r-- | 2d/font.scm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/2d/font.scm b/2d/font.scm index 45b59d0..182f25b 100644 --- a/2d/font.scm +++ b/2d/font.scm @@ -95,14 +95,13 @@ upper-left corner rather than the bottom-left." (%make-textbox font text position color alignment line-length layout))) (define (draw-textbox textbox) - (let ((pos (textbox-position textbox))) - (with-gl-push-matrix - (gl-translate (vx pos) (vy pos) 0) - (flip-text (textbox-font textbox)) - (apply-color (textbox-color textbox)) - (ftgl-render-layout (textbox-layout textbox) - (textbox-text textbox) - (ftgl-render-mode all))))) + (with-gl-push-matrix + (vector2-translate (textbox-position textbox)) + (flip-text (textbox-font textbox)) + (apply-color (textbox-color textbox)) + (ftgl-render-layout (textbox-layout textbox) + (textbox-text textbox) + (ftgl-render-mode all)))) (export <textbox> make-textbox |