summaryrefslogtreecommitdiff
path: root/2d/font.scm
diff options
context:
space:
mode:
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