diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2020-04-08 17:10:29 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2020-04-08 17:10:29 -0400 |
commit | e7d470e954d0a17ab1b2fe0065f46f78475272f9 (patch) | |
tree | ca4d9c00789f41dbbdbac33151824812dad879f7 /manuals/chickadee/Textures.html | |
parent | b660cbb5287f7cdcb6cebaba72afe8fc7d512616 (diff) |
Add chickade 0.5.0 stuff.
Diffstat (limited to 'manuals/chickadee/Textures.html')
-rw-r--r-- | manuals/chickadee/Textures.html | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/manuals/chickadee/Textures.html b/manuals/chickadee/Textures.html index f7de7ab..98639a3 100644 --- a/manuals/chickadee/Textures.html +++ b/manuals/chickadee/Textures.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> -<!-- Copyright (C) 2017, 2018, 2019 David Thompson davet@gnu.org +<!-- Copyright (C) 2017-2020 David Thompson davet@gnu.org Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -18,7 +18,7 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> -<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Textures (The Chickadee Game Toolkit)</title> @@ -33,28 +33,19 @@ http://www.texinfo.org/ (GNU Texinfo). <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Graphics.html#Graphics" rel="up" title="Graphics"> <link href="Sprites.html#Sprites" rel="next" title="Sprites"> -<link href="Graphics.html#Graphics" rel="prev" title="Graphics"> +<link href="Colors.html#Colors" rel="prev" title="Colors"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} -blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} -blockquote.smallquotation {font-size: smaller} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} div.lisp {margin-left: 3.2em} -div.smalldisplay {margin-left: 3.2em} -div.smallexample {margin-left: 3.2em} -div.smalllisp {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} -pre.smalldisplay {font-family: inherit; font-size: smaller} -pre.smallexample {font-size: smaller} -pre.smallformat {font-family: inherit; font-size: smaller} -pre.smalllisp {font-size: smaller} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} @@ -89,17 +80,19 @@ ul.no-bullet {list-style: none} </head> <body lang="en"> -<a name="Textures"></a> -<div class="header"> +<span id="Textures"></span><div class="header"> <p> -Next: <a href="Sprites.html#Sprites" accesskey="n" rel="next">Sprites</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Sprites.html#Sprites" accesskey="n" rel="next">Sprites</a>, Previous: <a href="Colors.html#Colors" accesskey="p" rel="prev">Colors</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> <hr> -<a name="Textures-1"></a> -<h4 class="subsection">2.3.1 Textures</h4> +<span id="Textures-1"></span><h4 class="subsection">2.3.2 Textures</h4> +<p>Textures are essentially images: a 2D grid of color values. The +<code>(chickadee render texture)</code> module provides an interface for +working with texture objects. +</p> <dl> -<dt><a name="index-load_002dimage"></a>Procedure: <strong>load-image</strong> <em>file [#:min-filter nearest] [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat]</em></dt> +<dt id="index-load_002dimage">Procedure: <strong>load-image</strong> <em>file [#:min-filter nearest] [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat] [#:transparent-color]</em></dt> <dd> <p>Load the image data from <var>file</var> and return a new texture object. </p> @@ -112,38 +105,41 @@ coordinates that are greater than <code>1.0</code>. Possible values are <code>repeat</code>, <code>clamp</code>, <code>clamp-to-border</code>, and <code>clamp-to-edge</code>. </p> +<p>For color-keyed images (images where a specific color should be made +transparent), specify the appropriate <var>transparent-color</var>. +</p> </dd></dl> <dl> -<dt><a name="index-texture_003f"></a>Procedure: <strong>texture?</strong> <em>obj</em></dt> +<dt id="index-texture_003f">Procedure: <strong>texture?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a texture. </p></dd></dl> <dl> -<dt><a name="index-texture_002dregion_003f"></a>Procedure: <strong>texture-region?</strong> <em>obj</em></dt> +<dt id="index-texture_002dregion_003f">Procedure: <strong>texture-region?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a texture region. </p></dd></dl> <dl> -<dt><a name="index-texture_002dparent"></a>Procedure: <strong>texture-parent</strong> <em>texture</em></dt> +<dt id="index-texture_002dparent">Procedure: <strong>texture-parent</strong> <em>texture</em></dt> <dd><p>If <var>texture</var> is a texture region, return the full texture that it is based upon. Otherwise, return <code>#f</code>. </p></dd></dl> <dl> -<dt><a name="index-texture_002dmin_002dfilter"></a>Procedure: <strong>texture-min-filter</strong> <em>texture</em></dt> +<dt id="index-texture_002dmin_002dfilter">Procedure: <strong>texture-min-filter</strong> <em>texture</em></dt> <dd><p>Return the minification filter for <var>texture</var>, either <code>nearest</code> or <code>linear</code>. </p></dd></dl> <dl> -<dt><a name="index-texture_002dmag_002dfilter"></a>Procedure: <strong>texture-mag-filter</strong> <em>texture</em></dt> +<dt id="index-texture_002dmag_002dfilter">Procedure: <strong>texture-mag-filter</strong> <em>texture</em></dt> <dd><p>Return the magnification filter for <var>texture</var>, either <code>nearest</code> or <code>linear</code>. </p></dd></dl> <dl> -<dt><a name="index-texture_002dwrap_002ds"></a>Procedure: <strong>texture-wrap-s</strong> <em>texture</em></dt> +<dt id="index-texture_002dwrap_002ds">Procedure: <strong>texture-wrap-s</strong> <em>texture</em></dt> <dd><p>Return the method used for wrapping texture coordinates along the X axis for <var>texture</var>. </p> @@ -158,18 +154,18 @@ axis for <var>texture</var>. </dd></dl> <dl> -<dt><a name="index-texture_002dwrap_002dt"></a>Procedure: <strong>texture-wrap-t</strong> <em>texture</em></dt> +<dt id="index-texture_002dwrap_002dt">Procedure: <strong>texture-wrap-t</strong> <em>texture</em></dt> <dd><p>Return the method used for wrapping texture coordinates along the Y axis for <var>texture</var>. </p></dd></dl> <dl> -<dt><a name="index-texture_002dwidth"></a>Procedure: <strong>texture-width</strong> <em>texture</em></dt> +<dt id="index-texture_002dwidth">Procedure: <strong>texture-width</strong> <em>texture</em></dt> <dd><p>Return the width of <var>texture</var> in pixels. </p></dd></dl> <dl> -<dt><a name="index-texture_002dheight"></a>Procedure: <strong>texture-height</strong> <em>texture</em></dt> +<dt id="index-texture_002dheight">Procedure: <strong>texture-height</strong> <em>texture</em></dt> <dd><p>Return the height of <var>texture</var> in pixels. </p></dd></dl> @@ -180,7 +176,7 @@ render a bunch of small textures. Chickadee provides a tile atlas data type for collecting texture regions into a single vector. </p> <dl> -<dt><a name="index-split_002dtexture"></a>Procedure: <strong>split-texture</strong> <em>texture tile-width tile-height [#:margin 0] [#:spacing 0]</em></dt> +<dt id="index-split_002dtexture">Procedure: <strong>split-texture</strong> <em>texture tile-width tile-height [#:margin 0] [#:spacing 0]</em></dt> <dd> <p>Return a new texture atlas that splits <var>texture</var> into a grid of <var>tile-width</var> by <var>tile-height</var> rectangles. Optionally, each @@ -193,24 +189,24 @@ See <a href="Tile-Maps.html#Tile-Maps">Tile Maps</a> for more information. </p></dd></dl> <dl> -<dt><a name="index-texture_002datlas_003f"></a>Procedure: <strong>texture-atlas?</strong> <em>obj</em></dt> +<dt id="index-texture_002datlas_003f">Procedure: <strong>texture-atlas?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a texture atlas. </p></dd></dl> <dl> -<dt><a name="index-texture_002datlas_002dtexture"></a>Procedure: <strong>texture-atlas-texture</strong> <em>atlas</em></dt> +<dt id="index-texture_002datlas_002dtexture">Procedure: <strong>texture-atlas-texture</strong> <em>atlas</em></dt> <dd><p>Return the texture that all texture regions in <var>atlas</var> have been created from. </p></dd></dl> <dl> -<dt><a name="index-texture_002datlas_002dref"></a>Procedure: <strong>texture-atlas-ref</strong> <em>atlas index</em></dt> +<dt id="index-texture_002datlas_002dref">Procedure: <strong>texture-atlas-ref</strong> <em>atlas index</em></dt> <dd><p>Return the texture region in <var>atlas</var> at <var>index</var>. </p></dd></dl> <hr> <div class="header"> <p> -Next: <a href="Sprites.html#Sprites" accesskey="n" rel="next">Sprites</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> +Next: <a href="Sprites.html#Sprites" accesskey="n" rel="next">Sprites</a>, Previous: <a href="Colors.html#Colors" accesskey="p" rel="prev">Colors</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p> </div> |