summaryrefslogtreecommitdiff
path: root/2d/font.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-27 18:39:38 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-27 18:39:38 -0400
commitcd9a3d80d8443b4e9a2fbab8f15235fd91e69052 (patch)
tree541cecc4b435294c4a3ca0d566d1dd57c64be0be /2d/font.scm
parent5841889f53465b4096830f3778b209063e1fe8bc (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.scm15
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