From 6920488169c1b287319c93bd1ea40d9412551b2c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 1 Aug 2022 16:10:16 -0400 Subject: graphics: sprite: Add #:shear argument to sprite-batch-add! --- chickadee/graphics/sprite.scm | 10 ++++++---- doc/api.texi | 4 ++-- 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}. -- cgit v1.2.3