summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-12-06 11:17:41 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-12-06 13:20:49 -0500
commitc577f2cbd49c2b93c67855310618f72998c0f172 (patch)
tree16c0db49eb069dfb3f7094547e96a3539af37abf
parentdc684d52e380c47d40336005a1ebbc842f3a6276 (diff)
render: sprite: Floor anchor coordinates to prevent fuzzy images.
* sly/render/sprite.scm (make-sprite): Floor anchor vector.
-rw-r--r--sly/render/sprite.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/sly/render/sprite.scm b/sly/render/sprite.scm
index ace9373..9bd487a 100644
--- a/sly/render/sprite.scm
+++ b/sly/render/sprite.scm
@@ -53,8 +53,8 @@
size of the mesh is the size of TEXTURE, in pixels. Optionally, a
custom SHADER can be specified."
(let* ((anchor (anchor-texture texture anchor))
- (x1 (- (vx anchor)))
- (y1 (- (vy anchor)))
+ (x1 (- (floor (vx anchor))))
+ (y1 (- (floor (vy anchor))))
(x2 (+ x1 (texture-width texture)))
(y2 (+ y1 (texture-height texture)))
(s1 (texture-s1 texture))