Sophie

Sophie

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

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: igraphic/image.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>igraphic/image.h</h1><a href="image_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) 1998 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment">    Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_IGRAPHIC_IMAGE_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IGRAPHIC_IMAGE_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">struct </span><a class="code" href="structiDataBuffer.html" title="The iDataBuffer interface can be used to exchange buffers with abstract data between...">iDataBuffer</a>;
<a name="l00034"></a>00034 <span class="keyword">struct </span><a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>;
<a name="l00035"></a>00035 
<a name="l00043"></a>00043 
<a name="l00044"></a><a class="code" href="group__gfx2d.html#gb8e38ce5133c3cce1c2d88eb21356527">00044</a> <span class="preprocessor">#define CS_IMGFMT_MASK (0x0000ffff)</span>
<a name="l00046"></a><a class="code" href="group__gfx2d.html#g48d0256ca935744d6c5ece0dbe156263">00046</a> <span class="preprocessor">#define CS_IMGFMT_NONE (0x00000000)</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00051"></a><a class="code" href="group__gfx2d.html#g791c191ba6818e10601813fe27d9ce6f">00051</a> <span class="preprocessor">#define CS_IMGFMT_TRUECOLOR (0x00000001)</span>
<a name="l00053"></a><a class="code" href="group__gfx2d.html#g54dca255a267b8d38b40e1afdc64e208">00053</a> <span class="preprocessor">#define CS_IMGFMT_PALETTED8 (0x00000002)</span>
<a name="l00055"></a><a class="code" href="group__gfx2d.html#g5d4465ca5493fe3cbeb3619f0ba11d01">00055</a> <span class="preprocessor">#define CS_IMGFMT_ANY (CS_IMGFMT_MASK)</span>
<a name="l00057"></a><a class="code" href="group__gfx2d.html#g0bb0aa06526b14f17b2ae8e81676f02d">00057</a> <span class="preprocessor">#define CS_IMGFMT_ALPHA (0x00010000)</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00062"></a><a class="code" href="group__gfx2d.html#gf3ca8894f5d78e67f5d363a46c6d39e7">00062</a> <span class="preprocessor">#define CS_IMGFMT_INVALID (0x80000000)</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00066"></a><a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469">00066</a> <span class="keyword">enum</span> <a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469" title="Type of an image.">csImageType</a>
<a name="l00067"></a>00067 {
<a name="l00069"></a><a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb899469bf9c914f4bc9a6d12c118773e1a97740">00069</a>   <a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb899469bf9c914f4bc9a6d12c118773e1a97740" title="2D image. Nothing special.">csimg2D</a> = 0,
<a name="l00073"></a><a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb89946991cba43ea68cfe2b81e13df88729d50d">00073</a>   <a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb89946991cba43ea68cfe2b81e13df88729d50d" title="3D image.">csimg3D</a>,
<a name="l00079"></a><a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb899469f6af02ca60086548a30cba8999f8d095">00079</a>   <a class="code" href="group__gfx2d.html#gge62190ffec24a286b2d4b50dcb899469f6af02ca60086548a30cba8999f8d095" title="Cube map.">csimgCube</a>
<a name="l00080"></a>00080 };
<a name="l00081"></a>00081 
<a name="l00096"></a><a class="code" href="structiImage.html">00096</a> <span class="keyword">struct </span><a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098   SCF_INTERFACE (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>, 4, 0, 0);
<a name="l00099"></a>00099 
<a name="l00107"></a>00107   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code" href="structiImage.html#c6ef621537753b4409a003b126d3122c" title="Get image data: returns either (csRGBpixel *) or (unsigned char *) depending on format...">GetImageData</a> () = 0;
<a name="l00109"></a>00109   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiImage.html#e46445da6aa7836ce65a1181b9125835" title="Query image width.">GetWidth</a>() <span class="keyword">const</span> = 0;
<a name="l00111"></a>00111   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiImage.html#31a45f12e47bbdca9754117200ce9658" title="Query image height.">GetHeight</a>() <span class="keyword">const</span> = 0;
<a name="l00113"></a>00113   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiImage.html#af91c32e0a30f974fdcad3919cb5ba66" title="Query image depth (only sensible when the image type is csimg3D).">GetDepth</a>() <span class="keyword">const</span> = 0;
<a name="l00114"></a>00114 
<a name="l00116"></a>00116   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiImage.html#fb6d896c16682e094acad01530ec8e6a" title="Set image file name.">SetName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *iName) = 0;
<a name="l00118"></a>00118   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiImage.html#0ed17a5a05284bcdc7855238d1aceac3" title="Get image file name.">GetName</a> () <span class="keyword">const</span> = 0;
<a name="l00119"></a>00119 
<a name="l00121"></a>00121   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiImage.html#dcfcf95222b2f49662efaf5aca8033c8" title="Qyery image format (see CS_IMGFMT_XXX above).">GetFormat</a> () <span class="keyword">const</span> = 0;
<a name="l00123"></a>00123   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a>* <a class="code" href="structiImage.html#e068da9b43ba09ac4630e2892ff5b623" title="Get image palette (or 0 if no palette).">GetPalette</a> () = 0;
<a name="l00130"></a>00130   <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>* <a class="code" href="structiImage.html#c8bc18376ddca1d07c3711226739cbd4" title="Get alpha map for 8-bit paletted image.">GetAlpha</a> () = 0;
<a name="l00131"></a>00131 
<a name="l00133"></a>00133   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiImage.html#3a78d763bd95c2bb63bb3d1fc38153b9" title="Check if image has a keycolour stored with it.">HasKeyColor</a> () <span class="keyword">const</span> = 0;
<a name="l00134"></a>00134 
<a name="l00136"></a>00136   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiImage.html#eb591dea9353b4afc04d012ca0413277" title="Get the keycolour stored with the image.">GetKeyColor</a> (<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> = 0;
<a name="l00137"></a>00137 
<a name="l00143"></a>00143   <span class="keyword">virtual</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="structiImage.html#be0ebf813ef5c14192471df9a82bfecc" title="Returns the number of mipmaps contained in the image (in case there exist any precalculated...">HasMipmaps</a> () <span class="keyword">const</span> = 0;
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iImage&gt;</a> <a class="code" href="structiImage.html#3b83098f175ff487283643be45da9b38" title="Return a precomputed mipmap.">GetMipmap</a> (<a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> num) = 0;
<a name="l00150"></a>00150   
<a name="l00158"></a>00158   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiImage.html#4ce4fb6f4ceac4e0a917e084080f706d" title="Get a string identifying the format of the raw data of the image (or 0 if raw data...">GetRawFormat</a>() <span class="keyword">const</span> = 0;
<a name="l00162"></a>00162   <span class="keyword">virtual</span> <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iDataBuffer&gt;</a> <a class="code" href="structiImage.html#865140f81cf37db314331efed7ec1d8a" title="Get the raw data of the image (or 0 if raw data is not provided).">GetRawData</a>() <span class="keyword">const</span> = 0;
<a name="l00166"></a>00166   <span class="keyword">virtual</span> <a class="code" href="group__gfx2d.html#ge62190ffec24a286b2d4b50dcb899469" title="Type of an image.">csImageType</a>  <a class="code" href="structiImage.html#37f6dc9cf212e9cc0ec34eeb93b12c3b" title="Get the type of the contained image.">GetImageType</a>() <span class="keyword">const</span> = 0;
<a name="l00171"></a>00171   <span class="keyword">virtual</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="structiImage.html#83c3d16da129a42d19ce693f28e392e3" title="Returns the number of sub images, in addition to this image.">HasSubImages</a>() <span class="keyword">const</span> = 0;
<a name="l00178"></a>00178   <span class="keyword">virtual</span> <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iImage&gt;</a> <a class="code" href="structiImage.html#51536f99e715892c1906811cb3f1ddd0" title="Query a sub image.">GetSubImage</a> (<a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> num) = 0;
<a name="l00179"></a>00179 };
<a name="l00180"></a>00180 
<a name="l00183"></a>00183 <span class="preprocessor">#endif // __CS_IGRAPHIC_IMAGE_H__</span>
<a name="l00184"></a>00184 <span class="preprocessor"></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>