Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 2a9a0500ba8dfb95025148f22d49b751 > files > 57

lib64caca-devel-0.99-0.beta18.13.mga6.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
    <title>libcaca documentation</title>
    <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
<!-- Generated by Doxygen 1.8.11 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">libcaca bitmap dithering</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga08c338d4fb79aff467f4056c857b12df"><td class="memItemLeft" align="right" valign="top">__extern <a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga08c338d4fb79aff467f4056c857b12df">caca_create_dither</a> (int, int, int, int, uint32_t, uint32_t, uint32_t, uint32_t)</td></tr>
<tr class="memdesc:ga08c338d4fb79aff467f4056c857b12df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an internal dither object.  <a href="#ga08c338d4fb79aff467f4056c857b12df">More...</a><br /></td></tr>
<tr class="separator:ga08c338d4fb79aff467f4056c857b12df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaee20b3233a6dbe8147c36f82039e481a"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gaee20b3233a6dbe8147c36f82039e481a">caca_set_dither_palette</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, uint32_t r[], uint32_t g[], uint32_t b[], uint32_t a[])</td></tr>
<tr class="memdesc:gaee20b3233a6dbe8147c36f82039e481a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the palette of an 8bpp dither object.  <a href="#gaee20b3233a6dbe8147c36f82039e481a">More...</a><br /></td></tr>
<tr class="separator:gaee20b3233a6dbe8147c36f82039e481a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2596a6934b0a57e8a0cb3e1c9ba3a15d"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga2596a6934b0a57e8a0cb3e1c9ba3a15d">caca_set_dither_brightness</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, float)</td></tr>
<tr class="memdesc:ga2596a6934b0a57e8a0cb3e1c9ba3a15d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the brightness of a dither object.  <a href="#ga2596a6934b0a57e8a0cb3e1c9ba3a15d">More...</a><br /></td></tr>
<tr class="separator:ga2596a6934b0a57e8a0cb3e1c9ba3a15d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga860ea183ad7477c525716c29a81986aa"><td class="memItemLeft" align="right" valign="top">__extern float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga860ea183ad7477c525716c29a81986aa">caca_get_dither_brightness</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga860ea183ad7477c525716c29a81986aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the brightness of a dither object.  <a href="#ga860ea183ad7477c525716c29a81986aa">More...</a><br /></td></tr>
<tr class="separator:ga860ea183ad7477c525716c29a81986aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga517a2a69c6b2e1772ddb795cb55996bb"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga517a2a69c6b2e1772ddb795cb55996bb">caca_set_dither_gamma</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, float)</td></tr>
<tr class="memdesc:ga517a2a69c6b2e1772ddb795cb55996bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the gamma of a dither object.  <a href="#ga517a2a69c6b2e1772ddb795cb55996bb">More...</a><br /></td></tr>
<tr class="separator:ga517a2a69c6b2e1772ddb795cb55996bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6bd45a095a0bc9f9716cb543045f646"><td class="memItemLeft" align="right" valign="top">__extern float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gac6bd45a095a0bc9f9716cb543045f646">caca_get_dither_gamma</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:gac6bd45a095a0bc9f9716cb543045f646"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the gamma of a dither object.  <a href="#gac6bd45a095a0bc9f9716cb543045f646">More...</a><br /></td></tr>
<tr class="separator:gac6bd45a095a0bc9f9716cb543045f646"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac04772ed41dce6f3d613e8efd25c3038"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gac04772ed41dce6f3d613e8efd25c3038">caca_set_dither_contrast</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, float)</td></tr>
<tr class="memdesc:gac04772ed41dce6f3d613e8efd25c3038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the contrast of a dither object.  <a href="#gac04772ed41dce6f3d613e8efd25c3038">More...</a><br /></td></tr>
<tr class="separator:gac04772ed41dce6f3d613e8efd25c3038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga059d26f5964cc6eb809be99a43155383"><td class="memItemLeft" align="right" valign="top">__extern float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga059d26f5964cc6eb809be99a43155383">caca_get_dither_contrast</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga059d26f5964cc6eb809be99a43155383"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the contrast of a dither object.  <a href="#ga059d26f5964cc6eb809be99a43155383">More...</a><br /></td></tr>
<tr class="separator:ga059d26f5964cc6eb809be99a43155383"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e11d68966e0b2d709b377385fbcabd4"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga6e11d68966e0b2d709b377385fbcabd4">caca_set_dither_antialias</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, char const *)</td></tr>
<tr class="memdesc:ga6e11d68966e0b2d709b377385fbcabd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set dither antialiasing.  <a href="#ga6e11d68966e0b2d709b377385fbcabd4">More...</a><br /></td></tr>
<tr class="separator:ga6e11d68966e0b2d709b377385fbcabd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e0986062cb064bf7bcef0105233857e"><td class="memItemLeft" align="right" valign="top">__extern char const *const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga6e0986062cb064bf7bcef0105233857e">caca_get_dither_antialias_list</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga6e0986062cb064bf7bcef0105233857e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get available antialiasing methods.  <a href="#ga6e0986062cb064bf7bcef0105233857e">More...</a><br /></td></tr>
<tr class="separator:ga6e0986062cb064bf7bcef0105233857e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga297c7ca7506e7b293dbbe3db89432c95"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga297c7ca7506e7b293dbbe3db89432c95">caca_get_dither_antialias</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga297c7ca7506e7b293dbbe3db89432c95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current antialiasing method.  <a href="#ga297c7ca7506e7b293dbbe3db89432c95">More...</a><br /></td></tr>
<tr class="separator:ga297c7ca7506e7b293dbbe3db89432c95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4a7a941295c958221d9010070f0c35c"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gae4a7a941295c958221d9010070f0c35c">caca_set_dither_color</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, char const *)</td></tr>
<tr class="memdesc:gae4a7a941295c958221d9010070f0c35c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Choose colours used for dithering.  <a href="#gae4a7a941295c958221d9010070f0c35c">More...</a><br /></td></tr>
<tr class="separator:gae4a7a941295c958221d9010070f0c35c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga973d84c24e352d3da09f02a49b79ebf0"><td class="memItemLeft" align="right" valign="top">__extern char const *const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga973d84c24e352d3da09f02a49b79ebf0">caca_get_dither_color_list</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga973d84c24e352d3da09f02a49b79ebf0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get available colour modes.  <a href="#ga973d84c24e352d3da09f02a49b79ebf0">More...</a><br /></td></tr>
<tr class="separator:ga973d84c24e352d3da09f02a49b79ebf0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e1a540d2c24168daaf1d93847c47bbc"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga8e1a540d2c24168daaf1d93847c47bbc">caca_get_dither_color</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga8e1a540d2c24168daaf1d93847c47bbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current colour mode.  <a href="#ga8e1a540d2c24168daaf1d93847c47bbc">More...</a><br /></td></tr>
<tr class="separator:ga8e1a540d2c24168daaf1d93847c47bbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga24068afd82cf4d2ee62575b811b276ec"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga24068afd82cf4d2ee62575b811b276ec">caca_set_dither_charset</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, char const *)</td></tr>
<tr class="memdesc:ga24068afd82cf4d2ee62575b811b276ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Choose characters used for dithering.  <a href="#ga24068afd82cf4d2ee62575b811b276ec">More...</a><br /></td></tr>
<tr class="separator:ga24068afd82cf4d2ee62575b811b276ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8fe7b7974810cc054f2aab9248f6263"><td class="memItemLeft" align="right" valign="top">__extern char const *const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gab8fe7b7974810cc054f2aab9248f6263">caca_get_dither_charset_list</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:gab8fe7b7974810cc054f2aab9248f6263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get available dither character sets.  <a href="#gab8fe7b7974810cc054f2aab9248f6263">More...</a><br /></td></tr>
<tr class="separator:gab8fe7b7974810cc054f2aab9248f6263"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga11e927c2b3035f6b8e52150a0609761d"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga11e927c2b3035f6b8e52150a0609761d">caca_get_dither_charset</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga11e927c2b3035f6b8e52150a0609761d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current character set.  <a href="#ga11e927c2b3035f6b8e52150a0609761d">More...</a><br /></td></tr>
<tr class="separator:ga11e927c2b3035f6b8e52150a0609761d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4628a5089d92b8f92c71df9c4c921081"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga4628a5089d92b8f92c71df9c4c921081">caca_set_dither_algorithm</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *, char const *)</td></tr>
<tr class="memdesc:ga4628a5089d92b8f92c71df9c4c921081"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set dithering algorithm.  <a href="#ga4628a5089d92b8f92c71df9c4c921081">More...</a><br /></td></tr>
<tr class="separator:ga4628a5089d92b8f92c71df9c4c921081"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ffe7b5a8f9315fc62220120a4917734"><td class="memItemLeft" align="right" valign="top">__extern char const *const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga8ffe7b5a8f9315fc62220120a4917734">caca_get_dither_algorithm_list</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga8ffe7b5a8f9315fc62220120a4917734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get dithering algorithms.  <a href="#ga8ffe7b5a8f9315fc62220120a4917734">More...</a><br /></td></tr>
<tr class="separator:ga8ffe7b5a8f9315fc62220120a4917734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga940ea881e13f7f1a3d0ad1a431e44ecd"><td class="memItemLeft" align="right" valign="top">__extern char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga940ea881e13f7f1a3d0ad1a431e44ecd">caca_get_dither_algorithm</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *)</td></tr>
<tr class="memdesc:ga940ea881e13f7f1a3d0ad1a431e44ecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current dithering algorithm.  <a href="#ga940ea881e13f7f1a3d0ad1a431e44ecd">More...</a><br /></td></tr>
<tr class="separator:ga940ea881e13f7f1a3d0ad1a431e44ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7e10436664deb729029918c6275edb6"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#gae7e10436664deb729029918c6275edb6">caca_dither_bitmap</a> (<a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *, int, int, int, int, <a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *, void const *)</td></tr>
<tr class="memdesc:gae7e10436664deb729029918c6275edb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dither a bitmap on the canvas.  <a href="#gae7e10436664deb729029918c6275edb6">More...</a><br /></td></tr>
<tr class="separator:gae7e10436664deb729029918c6275edb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b23aea21bcbbcec02e45383721a00f6"><td class="memItemLeft" align="right" valign="top">__extern int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither</a> (<a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *)</td></tr>
<tr class="memdesc:ga5b23aea21bcbbcec02e45383721a00f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free the memory associated with a dither.  <a href="#ga5b23aea21bcbbcec02e45383721a00f6">More...</a><br /></td></tr>
<tr class="separator:ga5b23aea21bcbbcec02e45383721a00f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions provide high level routines for dither allocation and rendering. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga08c338d4fb79aff467f4056c857b12df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern <a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a>* caca_create_dither </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bpp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pitch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>rmask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>gmask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bmask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>amask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a dither structure from its coordinates (depth, width, height and pitch) and pixel mask values. If the depth is 8 bits per pixel, the mask values are ignored and the colour palette should be set using the <a class="el" href="group__caca__dither.html#gaee20b3233a6dbe8147c36f82039e481a" title="Set the palette of an 8bpp dither object. ">caca_set_dither_palette()</a> function. For depths greater than 8 bits per pixel, a zero alpha mask causes the alpha values to be ignored.</p>
<p>If an error occurs, NULL is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Requested width, height, pitch or bits per pixel value was invalid.</li>
<li><code>ENOMEM</code> Not enough memory to allocate dither structure.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bpp</td><td>Bitmap depth in bits per pixel. </td></tr>
    <tr><td class="paramname">w</td><td>Bitmap width in pixels. </td></tr>
    <tr><td class="paramname">h</td><td>Bitmap height in pixels. </td></tr>
    <tr><td class="paramname">pitch</td><td>Bitmap pitch in bytes. </td></tr>
    <tr><td class="paramname">rmask</td><td>Bitmask for red values. </td></tr>
    <tr><td class="paramname">gmask</td><td>Bitmask for green values. </td></tr>
    <tr><td class="paramname">bmask</td><td>Bitmask for blue values. </td></tr>
    <tr><td class="paramname">amask</td><td>Bitmask for alpha values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Dither object upon success, NULL if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gaee20b3233a6dbe8147c36f82039e481a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_palette </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>red</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>green</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>blue</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>alpha</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the palette of an 8 bits per pixel bitmap. Values should be between 0 and 4095 (0xfff).</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Dither bits per pixel value is not 8, or one of the pixel values was outside the range 0 - 4095.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">red</td><td>Array of 256 red values. </td></tr>
    <tr><td class="paramname">green</td><td>Array of 256 green values. </td></tr>
    <tr><td class="paramname">blue</td><td>Array of 256 blue values. </td></tr>
    <tr><td class="paramname">alpha</td><td>Array of 256 alpha values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga2596a6934b0a57e8a0cb3e1c9ba3a15d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_brightness </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>brightness</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the brightness of dither.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Brightness value was out of range.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">brightness</td><td>brightness value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga860ea183ad7477c525716c29a81986aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern float caca_get_dither_brightness </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the brightness of the given dither object.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Brightness value. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga517a2a69c6b2e1772ddb795cb55996bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_gamma </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>gamma</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the gamma of the given dither object. A negative value causes colour inversion.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Gamma value was out of range.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">gamma</td><td>Gamma value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gac6bd45a095a0bc9f9716cb543045f646"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern float caca_get_dither_gamma </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the gamma of the given dither object.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Gamma value. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gac04772ed41dce6f3d613e8efd25c3038"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_contrast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>contrast</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the contrast of dither.</p>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Contrast value was out of range.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">contrast</td><td>contrast value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga059d26f5964cc6eb809be99a43155383"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern float caca_get_dither_contrast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the contrast of the given dither object.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Contrast value. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6e11d68966e0b2d709b377385fbcabd4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_antialias </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tell the renderer whether to antialias the dither. Antialiasing smoothens the rendered image and avoids the commonly seen staircase effect.</p><ul>
<li><code>"none"</code>: no antialiasing.</li>
<li><code>"prefilter"</code> or <code>"default"</code>: simple prefilter antialiasing. This is the default value.</li>
</ul>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Invalid antialiasing mode.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">str</td><td>A string describing the antialiasing method that will be used for the dithering. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6e0986062cb064bf7bcef0105233857e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* const* caca_get_dither_antialias_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a list of available antialiasing methods for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the antialiasing method to be used with <a class="el" href="group__caca__dither.html#ga6e11d68966e0b2d709b377385fbcabd4" title="Set dither antialiasing. ">caca_set_dither_antialias()</a>, and a string containing the natural language description for that antialiasing method.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of strings. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga297c7ca7506e7b293dbbe3db89432c95"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_dither_antialias </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the given dither's current antialiasing method.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A static string. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gae4a7a941295c958221d9010070f0c35c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tell the renderer which colours should be used to render the bitmap. Valid values for <code>str</code> are:</p><ul>
<li><code>"mono"</code>: use light gray on a black background.</li>
<li><code>"gray"</code>: use white and two shades of gray on a black background.</li>
<li><code>"8"</code>: use the 8 ANSI colours on a black background.</li>
<li><code>"16"</code>: use the 16 ANSI colours on a black background.</li>
<li><code>"fullgray"</code>: use black, white and two shades of gray for both the characters and the background.</li>
<li><code>"full8"</code>: use the 8 ANSI colours for both the characters and the background.</li>
<li><code>"full16"</code> or <code>"default"</code>: use the 16 ANSI colours for both the characters and the background. This is the default value.</li>
</ul>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Invalid colour set.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">str</td><td>A string describing the colour set that will be used for the dithering. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga973d84c24e352d3da09f02a49b79ebf0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* const* caca_get_dither_color_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a list of available colour modes for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the colour mode, to be used with <a class="el" href="group__caca__dither.html#gae4a7a941295c958221d9010070f0c35c" title="Choose colours used for dithering. ">caca_set_dither_color()</a>, and a string containing the natural language description for that colour mode.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of strings. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga8e1a540d2c24168daaf1d93847c47bbc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_dither_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the given dither's current colour mode.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A static string. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga24068afd82cf4d2ee62575b811b276ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_charset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tell the renderer which characters should be used to render the dither. Valid values for <code>str</code> are:</p><ul>
<li><code>"ascii"</code> or <code>"default"</code>: use only ASCII characters. This is the default value.</li>
<li><code>"shades"</code>: use Unicode characters "U+2591 LIGHT SHADE", "U+2592
  MEDIUM SHADE" and "U+2593 DARK SHADE". These characters are also present in the CP437 codepage available on DOS and VGA.</li>
<li><code>"blocks"</code>: use Unicode quarter-cell block combinations. These characters are only found in the Unicode set.</li>
</ul>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Invalid character set.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">str</td><td>A string describing the characters that need to be used for the dithering. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gab8fe7b7974810cc054f2aab9248f6263"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* const* caca_get_dither_charset_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a list of available character sets for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the character set, to be used with <a class="el" href="group__caca__dither.html#ga24068afd82cf4d2ee62575b811b276ec" title="Choose characters used for dithering. ">caca_set_dither_charset()</a>, and a string containing the natural language description for that character set.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of strings. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga11e927c2b3035f6b8e52150a0609761d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_dither_charset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the given dither's current character set.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A static string. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga4628a5089d92b8f92c71df9c4c921081"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_set_dither_algorithm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tell the renderer which dithering algorithm should be used. Dithering is necessary because the picture being rendered has usually far more colours than the available palette. Valid values for <code>str</code> are:</p><ul>
<li><code>"none"</code>: no dithering is used, the nearest matching colour is used.</li>
<li><code>"ordered2"</code>: use a 2x2 Bayer matrix for dithering.</li>
<li><code>"ordered4"</code>: use a 4x4 Bayer matrix for dithering.</li>
<li><code>"ordered8"</code>: use a 8x8 Bayer matrix for dithering.</li>
<li><code>"random"</code>: use random dithering.</li>
<li><code>"fstein"</code>: use Floyd-Steinberg dithering. This is the default value.</li>
</ul>
<p>If an error occurs, -1 is returned and <b>errno</b> is set accordingly:</p><ul>
<li><code>EINVAL</code> Unknown dithering mode.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
    <tr><td class="paramname">str</td><td>A string describing the algorithm that needs to be used for the dithering. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 in case of success, -1 if an error occurred. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga8ffe7b5a8f9315fc62220120a4917734"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* const* caca_get_dither_algorithm_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return a list of available dithering algorithms for a given dither. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the dithering algorithm, to be used with caca_set_dither_dithering(), and a string containing the natural language description for that algorithm.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of strings. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga940ea881e13f7f1a3d0ad1a431e44ecd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern char const* caca_get_dither_algorithm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return the given dither's current dithering algorithm.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A static string. </dd></dl>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="gae7e10436664deb729029918c6275edb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_dither_bitmap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#aae0f6938d08e6e0abbcd5a8c06504ab8">caca_canvas_t</a> *&#160;</td>
          <td class="paramname"><em>cv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> const *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>pixels</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Dither a bitmap at the given coordinates. The dither can be of any size and will be stretched to the text area.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cv</td><td>A handle to the libcaca canvas. </td></tr>
    <tr><td class="paramname">x</td><td>X coordinate of the upper-left corner of the drawing area. </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate of the upper-left corner of the drawing area. </td></tr>
    <tr><td class="paramname">w</td><td>Width of the drawing area. </td></tr>
    <tr><td class="paramname">h</td><td>Height of the drawing area. </td></tr>
    <tr><td class="paramname">d</td><td>Dither object to be drawn. </td></tr>
    <tr><td class="paramname">pixels</td><td>Bitmap's pixels. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This function always returns 0. </dd></dl>

<p>References <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a9280adda765037612d94743bdc3f346d">CACA_BLACK</a>, <a class="el" href="group__caca__attributes.html#gafb35087f212d75b431fc501b3a777b6b">caca_get_attr()</a>, <a class="el" href="group__caca__canvas.html#ga21864614dada3ee29f10987a6e0d3064">caca_put_char()</a>, <a class="el" href="group__caca__attributes.html#ga3d19c3d519489534585901e0ca0516c9">caca_set_attr()</a>, and <a class="el" href="group__caca__attributes.html#ga1cd39df80cc6b537a4df18415a8605cf">caca_set_color_ansi()</a>.</p>

<p>Referenced by <a class="el" href="group__caca__dither.html#ga5b23aea21bcbbcec02e45383721a00f6">caca_free_dither()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5b23aea21bcbbcec02e45383721a00f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__extern int caca_free_dither </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="caca_8h.html#a0419a61256ab8d2dd020d33eafb351fa">caca_dither_t</a> *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Free the memory allocated by <a class="el" href="group__caca__dither.html#ga08c338d4fb79aff467f4056c857b12df" title="Create an internal dither object. ">caca_create_dither()</a>.</p>
<p>This function never fails.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>Dither object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This function always returns 0. </dd></dl>

<p>References <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a9280adda765037612d94743bdc3f346d">CACA_BLACK</a>, <a class="el" href="group__caca__dither.html#ga08c338d4fb79aff467f4056c857b12df">caca_create_dither()</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a1d6349b798d7b4cb154e08d0882d1c1c">CACA_DARKGRAY</a>, <a class="el" href="group__caca__dither.html#gae7e10436664deb729029918c6275edb6">caca_dither_bitmap()</a>, <a class="el" href="group__caca__dither.html#ga940ea881e13f7f1a3d0ad1a431e44ecd">caca_get_dither_algorithm()</a>, <a class="el" href="group__caca__dither.html#ga8ffe7b5a8f9315fc62220120a4917734">caca_get_dither_algorithm_list()</a>, <a class="el" href="group__caca__dither.html#ga297c7ca7506e7b293dbbe3db89432c95">caca_get_dither_antialias()</a>, <a class="el" href="group__caca__dither.html#ga6e0986062cb064bf7bcef0105233857e">caca_get_dither_antialias_list()</a>, <a class="el" href="group__caca__dither.html#ga860ea183ad7477c525716c29a81986aa">caca_get_dither_brightness()</a>, <a class="el" href="group__caca__dither.html#ga11e927c2b3035f6b8e52150a0609761d">caca_get_dither_charset()</a>, <a class="el" href="group__caca__dither.html#gab8fe7b7974810cc054f2aab9248f6263">caca_get_dither_charset_list()</a>, <a class="el" href="group__caca__dither.html#ga8e1a540d2c24168daaf1d93847c47bbc">caca_get_dither_color()</a>, <a class="el" href="group__caca__dither.html#ga973d84c24e352d3da09f02a49b79ebf0">caca_get_dither_color_list()</a>, <a class="el" href="group__caca__dither.html#ga059d26f5964cc6eb809be99a43155383">caca_get_dither_contrast()</a>, <a class="el" href="group__caca__dither.html#gac6bd45a095a0bc9f9716cb543045f646">caca_get_dither_gamma()</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a5e5afd66b3a4fed117f3132e4b7cd5b7">CACA_LIGHTGRAY</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a18232d4d1c3a8b4754df303fb28e5138">CACA_LIGHTMAGENTA</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a69b1eff2f64a540ef96394963cade10a">CACA_LIGHTRED</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9aa7d693875fa56857ffebec8dfc2f2183">CACA_MAGENTA</a>, <a class="el" href="group__libcaca.html#ga685374ff836369f58a5c32a414096f2e">caca_rand()</a>, <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9ae4ad980b1d3b4ea597017da47b8b029f">CACA_RED</a>, <a class="el" href="group__caca__dither.html#ga4628a5089d92b8f92c71df9c4c921081">caca_set_dither_algorithm()</a>, <a class="el" href="group__caca__dither.html#ga6e11d68966e0b2d709b377385fbcabd4">caca_set_dither_antialias()</a>, <a class="el" href="group__caca__dither.html#ga2596a6934b0a57e8a0cb3e1c9ba3a15d">caca_set_dither_brightness()</a>, <a class="el" href="group__caca__dither.html#ga24068afd82cf4d2ee62575b811b276ec">caca_set_dither_charset()</a>, <a class="el" href="group__caca__dither.html#gae4a7a941295c958221d9010070f0c35c">caca_set_dither_color()</a>, <a class="el" href="group__caca__dither.html#gac04772ed41dce6f3d613e8efd25c3038">caca_set_dither_contrast()</a>, <a class="el" href="group__caca__dither.html#ga517a2a69c6b2e1772ddb795cb55996bb">caca_set_dither_gamma()</a>, <a class="el" href="group__caca__dither.html#gaee20b3233a6dbe8147c36f82039e481a">caca_set_dither_palette()</a>, and <a class="el" href="group__caca__attr.html#gga9db83488c6f07a5f7d773c380b3126a9a1bd1244f952d10b9599fb314e41862ad">CACA_WHITE</a>.</p>

</div>
</div>
</div><!-- contents -->
  </body>
</html>