Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1854

crystalspace-doc-1.2.1-5mdv2010.0.i586.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>Crystal Space 1.2.1: csgfx/imagememory.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>csgfx/imagememory.h</h1><a href="imagememory_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2000 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment">    Written by Samuel Humphreys</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">    Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00017"></a>00017 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_CSGFX_MEMIMAGE_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_CSGFX_MEMIMAGE_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "csextern.h"</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "csutil/leakguard.h"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="scf__implementation_8h.html" title="Crystal Space Shared Class Facility (SCF) - implementation creation support.">csutil/scf_implementation.h</a>"</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="imagebase_8h.html" title="Base class for iImage implementations.">csgfx/imagebase.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="imagetools_8h.html" title="Some helper functions to deal with iImage objects.">csgfx/imagetools.h</a>"</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="rgbpixel_8h.html" title="RGB colors.">csgfx/rgbpixel.h</a>"</span>
<a name="l00030"></a>00030 
<a name="l00040"></a><a class="code" href="classcsImageMemory.html">00040</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> :
<a name="l00041"></a>00041   <span class="keyword">public</span> <a class="code" href="classscfImplementationExt0.html">scfImplementationExt0</a>&lt;csImageMemory, csImageBase&gt;
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 <span class="keyword">private</span>:
<a name="l00045"></a>00045   <span class="keywordtype">void</span> ConstructCommon();
<a name="l00047"></a>00047   <span class="keywordtype">void</span> ConstructWHDF (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> depth, <span class="keywordtype">int</span> format);
<a name="l00049"></a>00049   <span class="keywordtype">void</span> ConstructSource (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* source);
<a name="l00051"></a>00051   <span class="keywordtype">void</span> ConstructBuffers (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">void</span>* buffer, 
<a name="l00052"></a>00052     <span class="keywordtype">bool</span> destroy, <span class="keywordtype">int</span> format, <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> *palette);
<a name="l00053"></a>00053 <span class="keyword">protected</span>:
<a name="l00055"></a><a class="code" href="classcsImageMemory.html#2c424ba4d7f434605e91a39baf20a4b1">00055</a>   <span class="keywordtype">int</span> Width;
<a name="l00057"></a><a class="code" href="classcsImageMemory.html#57e394f49c5ff61e51213ad237080076">00057</a>   <span class="keywordtype">int</span> Height;
<a name="l00059"></a><a class="code" href="classcsImageMemory.html#c67fbce54b8e730054de6c8c10e237f0">00059</a>   <span class="keywordtype">int</span> Depth;
<a name="l00066"></a><a class="code" href="classcsImageMemory.html#88c6fea768b5fe1b17616db0f3b732d5">00066</a>   <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iDataBuffer&gt;</a> databuf;
<a name="l00068"></a><a class="code" href="classcsImageMemory.html#ffa2f27da71b0b5cef79beca7cb2932f">00068</a>   <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> *Palette;
<a name="l00070"></a><a class="code" href="classcsImageMemory.html#9979218f2a691ff36cba4d97d62c036d">00070</a>   <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> *Alpha;
<a name="l00072"></a><a class="code" href="classcsImageMemory.html#26d6970ed3aead8041541b79dd4fceb9">00072</a>   <span class="keywordtype">int</span> Format;
<a name="l00074"></a><a class="code" href="classcsImageMemory.html#b8f33633a3b616cafa2e4b3c3cc30ca9">00074</a>   <span class="keywordtype">bool</span> has_keycolour;
<a name="l00076"></a><a class="code" href="classcsImageMemory.html#b99f16a832ce81a6f6a9fa5910a1a832">00076</a>   <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> keycolour;
<a name="l00078"></a><a class="code" href="classcsImageMemory.html#22e40494a158c8e86e58ff9c0de20499">00078</a>   <span class="keywordtype">bool</span> destroy_image;
<a name="l00080"></a><a class="code" href="classcsImageMemory.html#6d11c9f42b9d6e418fffa7ff4c4ea2ce">00080</a>   <a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469" title="Type of an image.">csImageType</a> imageType;
<a name="l00082"></a>00082   <span class="comment">/* @@@ This is not csRefArray&lt;iImage&gt; as this does not return csRef&lt;iImage&gt;&amp;</span>
<a name="l00083"></a>00083 <span class="comment">   * from GetExtend() or operator[], which is needed here. (See trac #71)</span>
<a name="l00084"></a>00084 <span class="comment">   */</span>
<a name="l00085"></a><a class="code" href="classcsImageMemory.html#8980c55d0d30d32464e58ad670e6b9da">00085</a>   <a class="code" href="classcsArray.html" title="A templated array class.">csArray&lt;csRef&lt;iImage&gt;</a> &gt; mipmaps;
<a name="l00086"></a>00086 
<a name="l00091"></a>00091   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<span class="keywordtype">int</span> iFormat);
<a name="l00101"></a>00101   <span class="keywordtype">void</span> SetDimensions (<span class="keywordtype">int</span> newWidth, <span class="keywordtype">int</span> newHeight);
<a name="l00102"></a>00102   <span class="keywordtype">void</span> SetDimensions (<span class="keywordtype">int</span> newWidth, <span class="keywordtype">int</span> newHeight, <span class="keywordtype">int</span> newDepth);
<a name="l00103"></a>00103 
<a name="l00105"></a>00105   <span class="keywordtype">void</span> AllocImage();
<a name="l00107"></a>00107   <span class="keywordtype">void</span> EnsureImage();
<a name="l00111"></a>00111   <span class="keywordtype">void</span> FreeImage ();
<a name="l00112"></a>00112 
<a name="l00113"></a>00113   <span class="keywordtype">void</span> InternalConvertFromRGBA (<a class="code" href="structiDataBuffer.html" title="The iDataBuffer interface can be used to exchange buffers with abstract data between...">iDataBuffer</a>* imageData);
<a name="l00114"></a>00114   <span class="keywordtype">void</span> InternalConvertFromPal8 (<a class="code" href="structiDataBuffer.html" title="The iDataBuffer interface can be used to exchange buffers with abstract data between...">iDataBuffer</a>* imageData, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* alpha, 
<a name="l00115"></a>00115     <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* iPalette, <span class="keywordtype">int</span> nPalColors = 256);
<a name="l00116"></a>00116 <span class="keyword">public</span>:
<a name="l00117"></a>00117   CS_LEAKGUARD_DECLARE (<a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a>);
<a name="l00118"></a>00118 
<a name="l00126"></a>00126   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> format = <a class="code" href="group__gfx2d.html#g791c191ba6818e10601813fe27d9ce6f" title="Truecolor format (r/g/b/unused resp.">CS_IMGFMT_TRUECOLOR</a>);
<a name="l00135"></a>00135   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> depth, <span class="keywordtype">int</span> format);
<a name="l00148"></a>00148   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">void</span>* buffer, <span class="keywordtype">bool</span> destroy,
<a name="l00149"></a>00149     <span class="keywordtype">int</span> format = <a class="code" href="group__gfx2d.html#g791c191ba6818e10601813fe27d9ce6f" title="Truecolor format (r/g/b/unused resp.">CS_IMGFMT_TRUECOLOR</a>, <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> *palette = 0);
<a name="l00160"></a>00160   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span>* buffer, 
<a name="l00161"></a>00161     <span class="keywordtype">int</span> format = <a class="code" href="group__gfx2d.html#g791c191ba6818e10601813fe27d9ce6f" title="Truecolor format (r/g/b/unused resp.">CS_IMGFMT_TRUECOLOR</a>, <span class="keyword">const</span> <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> *palette = 0);
<a name="l00166"></a>00166   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* source);
<a name="l00171"></a>00171   <a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* source, <span class="keywordtype">int</span> newFormat);
<a name="l00172"></a>00172 
<a name="l00173"></a>00173   <span class="keyword">virtual</span> ~<a class="code" href="classcsImageMemory.html" title="Memory image.">csImageMemory</a> ();
<a name="l00174"></a>00174 
<a name="l00176"></a>00176   <span class="keywordtype">void</span>* GetImagePtr ();
<a name="l00178"></a>00178   <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* GetPalettePtr ();
<a name="l00180"></a>00180   <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* GetAlphaPtr ();
<a name="l00181"></a>00181 
<a name="l00182"></a><a class="code" href="classcsImageMemory.html#ad1819c50cc745d90b45e513a59bdb9f">00182</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span> *GetImageData () { <span class="keywordflow">return</span> GetImagePtr(); }
<a name="l00183"></a><a class="code" href="classcsImageMemory.html#f4f7ac725ac7de173b05ba9b64cf7be2">00183</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetWidth ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Width; }
<a name="l00184"></a><a class="code" href="classcsImageMemory.html#d61754c0e0af35591d725e08a5e72b83">00184</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetHeight ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Height; }
<a name="l00185"></a><a class="code" href="classcsImageMemory.html#1d0a156069b7eaa44abecd5c96774ec8">00185</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetDepth ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Depth; }
<a name="l00186"></a>00186 
<a name="l00187"></a><a class="code" href="classcsImageMemory.html#5e78e6a1bedf5a2f652791f60a42b2aa">00187</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetRawFormat()<span class="keyword"> const </span>
<a name="l00188"></a>00188 <span class="keyword">  </span>{ 
<a name="l00189"></a>00189     <span class="keywordflow">if</span> ((Format &amp; <a class="code" href="group__gfx2d.html#gb8e38ce5133c3cce1c2d88eb21356527" title="The mask to separate the image format apart.">CS_IMGFMT_MASK</a>) == <a class="code" href="group__gfx2d.html#g791c191ba6818e10601813fe27d9ce6f" title="Truecolor format (r/g/b/unused resp.">CS_IMGFMT_TRUECOLOR</a>)
<a name="l00190"></a>00190       <span class="keywordflow">return</span> <span class="stringliteral">"a8b8g8r8"</span>; 
<a name="l00191"></a>00191     <span class="keywordflow">else</span>
<a name="l00192"></a>00192       <span class="keywordflow">return</span> 0;
<a name="l00193"></a>00193   }
<a name="l00194"></a><a class="code" href="classcsImageMemory.html#090a23f2bd3cad916f8f099d3dd2eb6a">00194</a>   <span class="keyword">virtual</span> <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iDataBuffer&gt;</a> GetRawData()<span class="keyword"> const </span>
<a name="l00195"></a>00195 <span class="keyword">  </span>{ 
<a name="l00196"></a>00196     <span class="comment">// Should this also call EnsureImage()?</span>
<a name="l00197"></a>00197     <span class="keywordflow">return</span> databuf; 
<a name="l00198"></a>00198   }
<a name="l00199"></a><a class="code" href="classcsImageMemory.html#c028edc605d3badec020c952e8368dc2">00199</a>   <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetFormat ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Format; }
<a name="l00200"></a><a class="code" href="classcsImageMemory.html#678bb2fa71f077c58d30640890ad7b8c">00200</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* GetPalette () { <span class="keywordflow">return</span> GetPalettePtr(); }
<a name="l00201"></a><a class="code" href="classcsImageMemory.html#792c385b2e95334f99e2bf0c4f9d73e2">00201</a>   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* GetAlpha () { <span class="keywordflow">return</span> GetAlphaPtr(); }
<a name="l00202"></a>00202 
<a name="l00203"></a><a class="code" href="classcsImageMemory.html#3ac872e07d79054d064495b428669dcc">00203</a>   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> HasKeyColor ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> has_keycolour; }
<a name="l00204"></a>00204 
<a name="l00205"></a><a class="code" href="classcsImageMemory.html#4599b6db9460da15d5f04be8a5fe9ee3">00205</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetKeyColor (<span class="keywordtype">int</span> &amp;r, <span class="keywordtype">int</span> &amp;g, <span class="keywordtype">int</span> &amp;b)<span class="keyword"> const</span>
<a name="l00206"></a>00206 <span class="keyword">  </span>{ r = keycolour.red; g = keycolour.green; b = keycolour.blue; }
<a name="l00207"></a>00207 
<a name="l00209"></a>00209   <span class="keywordtype">void</span> Clear (<span class="keyword">const</span> <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> &amp;colour);
<a name="l00210"></a>00210 
<a name="l00212"></a>00212   <span class="keywordtype">void</span> CheckAlpha ();
<a name="l00222"></a>00222   <span class="keywordtype">void</span> SetFormat (<span class="keywordtype">int</span> iFormat);
<a name="l00223"></a>00223 
<a name="l00225"></a>00225   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetKeyColor (<span class="keywordtype">int</span> r, <span class="keywordtype">int</span> g, <span class="keywordtype">int</span> b);
<a name="l00226"></a><a class="code" href="classcsImageMemory.html#5145c5529aae5cc80b6dbd377150082d">00226</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetKeycolor (<span class="keywordtype">int</span> r, <span class="keywordtype">int</span> g, <span class="keywordtype">int</span> b) { SetKeyColor(r,g,b); }
<a name="l00228"></a>00228   <span class="keyword">virtual</span> <span class="keywordtype">void</span> ClearKeyColor ();
<a name="l00229"></a><a class="code" href="classcsImageMemory.html#e6c2bf263283224faebc2f25ab4f5232">00229</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> ClearKeycolor () { ClearKeyColor(); }
<a name="l00230"></a>00230 
<a name="l00235"></a>00235   <span class="keyword">virtual</span> <span class="keywordtype">void</span> ApplyKeyColor ();
<a name="l00236"></a><a class="code" href="classcsImageMemory.html#cf6e1d49a6f2ed6546fe3d5c51bb11d0">00236</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> ApplyKeycolor () { ApplyKeyColor(); }
<a name="l00237"></a>00237 
<a name="l00238"></a><a class="code" href="classcsImageMemory.html#aa59a1047cdd54de633a79accfca7bc5">00238</a>   <span class="keyword">virtual</span> <a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469" title="Type of an image.">csImageType</a> GetImageType()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> imageType; }
<a name="l00239"></a><a class="code" href="classcsImageMemory.html#fa755d9cadd06c12cb96acdbc38fdf3c">00239</a>   <span class="keywordtype">void</span> SetImageType (<a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469" title="Type of an image.">csImageType</a> type) { imageType = type; }
<a name="l00240"></a>00240 
<a name="l00241"></a><a class="code" href="classcsImageMemory.html#556b083728f0a01ebded70e20c137e5b">00241</a>   <span class="keyword">virtual</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> HasMipmaps ()<span class="keyword"> const </span>
<a name="l00242"></a>00242 <span class="keyword">  </span>{ 
<a name="l00243"></a>00243     <span class="keywordtype">size_t</span> num = mipmaps.GetSize ();
<a name="l00244"></a>00244     <span class="keywordflow">while</span> ((num &gt; 0) &amp;&amp; (mipmaps[num-1] == 0)) num--;
<a name="l00245"></a>00245     <span class="keywordflow">return</span> (<a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a>)num; 
<a name="l00246"></a>00246   }
<a name="l00247"></a><a class="code" href="classcsImageMemory.html#a1c6e2410cea2aa451d0f6e7dd0a02ba">00247</a>   <span class="keyword">virtual</span> <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iImage&gt;</a> GetMipmap (<a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> num) 
<a name="l00248"></a>00248   { 
<a name="l00249"></a>00249     <span class="keywordflow">if</span> (num == 0) <span class="keywordflow">return</span> <span class="keyword">this</span>;
<a name="l00250"></a>00250     <span class="keywordflow">if</span> (num &lt;= mipmaps.GetSize ()) <span class="keywordflow">return</span> mipmaps[num-1];
<a name="l00251"></a>00251     <span class="keywordflow">return</span> 0; 
<a name="l00252"></a>00252   }
<a name="l00261"></a><a class="code" href="classcsImageMemory.html#b43fe5b3a31798925bb9d7fd1eda9f1c">00261</a>   <span class="keywordtype">bool</span> SetMipmap (<a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> num, <a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* mip)
<a name="l00262"></a>00262   {
<a name="l00263"></a>00263     <span class="keywordflow">if</span> (num == 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00264"></a>00264     mipmaps.GetExtend (num-1) = mip;
<a name="l00265"></a>00265     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00266"></a>00266   }
<a name="l00267"></a>00267 
<a name="l00269"></a>00269   <span class="keywordtype">bool</span> Copy (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* srcImage, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00274"></a>00274   <span class="keywordtype">bool</span> CopyScale (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* srcImage, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00279"></a>00279   <span class="keywordtype">bool</span> CopyTile (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* srcImage, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);
<a name="l00280"></a>00280 
<a name="l00292"></a>00292   <span class="keywordtype">void</span> ConvertFromRGBA (<a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* <a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>);
<a name="l00303"></a>00303   <span class="keywordtype">void</span> ConvertFromPal8 (<a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* <a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* alpha, <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* iPalette,
<a name="l00304"></a>00304     <span class="keywordtype">int</span> nPalColors = 256);
<a name="l00315"></a>00315   <span class="keywordtype">void</span> ConvertFromPal8 (<a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* <a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a>* alpha, 
<a name="l00316"></a>00316     <span class="keyword">const</span> <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>* iPalette, <span class="keywordtype">int</span> nPalColors = 256);
<a name="l00317"></a>00317 };
<a name="l00318"></a>00318 
<a name="l00321"></a>00321 <span class="preprocessor">#endif // __CS_CSGFX_MEMIMAGE_H__</span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>