summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-08-01 16:10:16 -0400
committerDavid Thompson <dthompson2@worcester.edu>2022-08-01 16:10:16 -0400
commit6920488169c1b287319c93bd1ea40d9412551b2c (patch)
treeb909154ea74750a39870dffd37c457dfc0e13109
parentf24c10e7fc455c092bff051d57a066d81fd77ec3 (diff)
graphics: sprite: Add #:shear argument to sprite-batch-add!
-rw-r--r--chickadee/graphics/sprite.scm10
-rw-r--r--doc/api.texi4
2 files changed, 8 insertions, 6 deletions
diff --git a/chickadee/graphics/sprite.scm b/chickadee/graphics/sprite.scm
index 327db67..3bb9cc1 100644
--- a/chickadee/graphics/sprite.scm
+++ b/chickadee/graphics/sprite.scm
@@ -317,10 +317,11 @@ texture may be specified via the TEXTURE-REGION argument."
position
#:key
(origin %null-vec2)
- (scale %default-scale)
(rotation 0.0)
- (tint white)
- texture-region)
+ (scale %default-scale)
+ (shear %null-vec2)
+ texture-region
+ (tint white))
"Add sprite to BATCH at POSITION. To render a subsection of the
batch's texture, a texture object whose parent is the batch texture
may be specified via the TEXTURE-REGION argument."
@@ -331,7 +332,8 @@ may be specified via the TEXTURE-REGION argument."
#:origin origin
#:position position
#:rotation rotation
- #:scale scale)
+ #:scale scale
+ #:shear shear)
(sprite-batch-add* batch rect matrix
#:tint tint
#:texture-region texture-region)))
diff --git a/doc/api.texi b/doc/api.texi
index 65a7020..9afc853 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -1895,8 +1895,8 @@ Set texture for @var{batch} to @var{texture}.
@end deffn
@deffn {Procedure} sprite-batch-add! batch position @
- [#:origin] [#:scale] [:rotation] @
- [#:tint @code{white}] [#:texture-region]
+ [#:origin] [:rotation] [#:scale] [#:shear] @
+ [#:texture-region] [#:tint @code{white}]
Add sprite located at @var{position} to @var{batch}.