summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2019-01-06 22:50:45 -0500
committerDavid Thompson <dthompson2@worcester.edu>2019-01-06 22:55:37 -0500
commita9671d07fd97dd4fe010647c84bc2e6a87d6687c (patch)
treecef79b9ec73768cdbe8051093487b9f4b22e71e8 /doc
parente6f37f4d005229264ee25e4424553776d8e0f0d8 (diff)
render: sprite: Revamp rendering process.
Add support for tinting and simplify batch rendering.
Diffstat (limited to 'doc')
-rw-r--r--doc/api.texi13
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/api.texi b/doc/api.texi
index b1881bd..fc1f8dd 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -1334,8 +1334,8 @@ stored in textures (@pxref{Textures}) and can be used to draw sprites
via the @code{draw-sprite} procedure.
@deffn {Procedure} draw-sprite @var{texture} @var{position} @
- [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] @
- [#:rect] [#:shader]
+ [#:tint white] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] @
+ [#:rect]
Draw @var{texture} at @var{position}.
@@ -1345,14 +1345,14 @@ Optionally, other transformations may be applied to the sprite.
transformations are applied relative to @var{origin}, a 2D vector,
which defaults to the lower-left corner.
+@var{tint} specifies the color to multiply against all the sprite's
+pixels. By default white is used, which does no tinting at all.
+
Alpha blending is used by default but the blending method can be
changed by specifying @var{blend-mode}.
The area drawn to is as big as the texture, by default. To draw to an
arbitrary section of the screen, specify @var{rect}.
-
-Finally, advanced users may specify @var{shader} to change the way the
-sprite is rendered entirely.
@end deffn
It's not uncommon to need to draw hundreds or thousands of sprites
@@ -1411,8 +1411,7 @@ artifacts.
@deffn {Procedure} draw-nine-patch @var{texture} @var{rect} @
[#:margin 0] [#:top-margin margin] [#:bottom-margin margin] @
[#:left-margin margin] [#:right-margin margin] @
- [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] @
- [#:shader]
+ [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha]
Draw a nine patch sprite. A nine patch sprite renders @var{texture}
as a @var{width} x @var{height} rectangle whose stretchable areas are