Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > f48941b2df41f17d4c9519d16b753438 > files > 421

ClanLib06-devel-0.6.5-16.fc13.x86_64.rpm


<html>
<head><title>ClanLib Reference: CL_PCXProvider</title></head>
<body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr>
<tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table>
<table align=center border=0 cellspacing=10> <tr>
<td><a href="entire_class_index.html">Entire Class Index</a></td>
<td><a href="class_index.html">Main Class Index</a></td>
<td><a href="cross_index.html">Cross Index</a></td>
<td><a href="global_index.html">Global Index</a></td>
</table><h1 align=center>Class CL_PCXProvider</h1><p>
<b>  Surface provider that can load PCX files.</b><br>
Contained in: <a href="global_index.html">global</a><br>
Derived from:
<a href="CL_SurfaceProvider_Generic.html">CL_SurfaceProvider_Generic</a>
<br>
Derived by:
<i>none</i>
<br>Group: Display (Surface Providers)
<p>
#include &lt;ClanLib/display.h&gt;
<p>
<hr noshade>
<table border=0>
<tr><td colspan=3><h3>public function member index:</h3></td>
<tr valign=top><td align=left><h3>Construction:</h3></td>
<tr valign=top><td align=right><tt><tt>static</tt> <a href="CL_Surface.html"><tt><font color=navy><b>CL_Surface</b></font></tt></a>*</tt> </td><td align=right><a href="CL_PCXProvider.html#2071"><tt><font color=blue><b>create</b></font></tt></a></td><td><tt>(<tt><font color=navy>std::string</font></tt> <tt><font color=blue>handle</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>provider</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=false, <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>char</font></tt> <tt><font color=blue>trans_col</font></tt>=0)</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2072"><tt><font color=blue><b>CL_PCXProvider</b></font></tt></a></td><td><tt>(<tt><font color=navy>std::string</font></tt> <tt><font color=blue>name</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>provider</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=false, <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>char</font></tt> <tt><font color=blue>trans_col</font></tt>=0)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_PCXProvider.html#2073"><tt><font color=blue><b>~CL_PCXProvider</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=left><h3>Attributes:</h3></td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2074"><tt><font color=blue><b>get_pitch</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2075"><tt><font color=blue><b>get_translate_x</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2076"><tt><font color=blue><b>get_translate_y</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2077"><tt><font color=blue><b>get_width</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2078"><tt><font color=blue><b>get_height</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2079"><tt><font color=blue><b>get_num_frames</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2080"><tt><font color=blue><b>get_red_mask</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2081"><tt><font color=blue><b>get_green_mask</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2082"><tt><font color=blue><b>get_blue_mask</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2083"><tt><font color=blue><b>get_alpha_mask</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2084"><tt><font color=blue><b>get_depth</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_Palette.html"><tt><font color=navy><b>CL_Palette</b></font></tt></a>*</tt> </td><td align=right><a href="CL_PCXProvider.html#2085"><tt><font color=blue><b>get_palette</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2086"><tt><font color=blue><b>is_indexed</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2087"><tt><font color=blue><b>uses_src_colorkey</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2088"><tt><font color=blue><b>get_src_colorkey</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt>*</tt> </td><td align=right><a href="CL_PCXProvider.html#2089"><tt><font color=blue><b>get_data</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td>
<tr valign=top><td align=left><h3>Operations:</h3></td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2090"><tt><font color=blue><b>perform_lock</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2091"><tt><font color=blue><b>perform_unlock</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2092"><tt><font color=blue><b>read_header</b></font></tt></a></td><td><tt>(<a href="CL_InputSource.html"><tt><font color=navy><b>CL_InputSource</b></font></tt></a>* <tt><font color=blue>_datafile</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PCXProvider.html#2093"><tt><font color=blue><b>read_data</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
  The PCX decoder has been modified to load most PCX files  (instead of just the ones created by Deluxe Paint IIe).  It now support 1,2,4,8, or 24 bit files... and has been tested  in all but a few situations.<br><br>  Technically, the implementation cheats in that it doesnt  store images with less than 8 bits per pixel in their   native format.  It simply converts them to PAL8  pixelformat instead of creating other pixelformats.<br><br>  Also note that the PCX decoder creates more bytes per   line than the image is supposed to contain.  We rely on the clipping  capabilities of ClanLib to take care of that.  Also note that some  default palettes were defined in the read_header() method.  These   definitions might be better placed in palette.h.  Since the scope of   the PCX_Provider rewrite was limited to the provider itself, no files  outside of pcx_provider.h and pcx_provider.cpp were modified.<br><br>  The PCX decoding code was moved to read_data() and read_header()  to make it easier to follow the code (called from perform_unlock()).<br><p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="2072"><font size=+1><b>CL_PCXProvider::CL_PCXProvider</b></font></a> -   Constructs a surface provider that can read pcx files.<br><tt></tt> <a href="CL_PCXProvider.html#2072"><tt><font color=blue><b>CL_PCXProvider</b></font></tt></a><tt>(<tt><font color=navy>std::string</font></tt> <tt><font color=blue>name</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>provider</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=false, <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>char</font></tt> <tt><font color=blue>trans_col</font></tt>=0)</tt>;<br><blockquote>  name - Name of the pcx file to load.<br>  provider - Input source provider that delivers the pcx file.<br>  transparent - True if a color in image should be transparent.<br>  trans_col - Transparency color used if 'transparent' is true. Defaults to color 0.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2071"><font size=+1><b>CL_PCXProvider::create</b></font></a> -   Loads the pcx file 'handle' from the inputsource provider 'provider. <br>  Creates a <a href="CL_Surface.html">CL_Surface</a> using the pcx image and returns it.<br>  If you just want to load a file, use 'handle' for filename, and set provider to NULL<br><tt><tt>static</tt> <a href="CL_Surface.html"><tt><font color=navy><b>CL_Surface</b></font></tt></a>*</tt> <a href="CL_PCXProvider.html#2071"><tt><font color=blue><b>create</b></font></tt></a><tt>(<tt><font color=navy>std::string</font></tt> <tt><font color=blue>handle</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>provider</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=false, <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>char</font></tt> <tt><font color=blue>trans_col</font></tt>=0)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2083"><font size=+1><b>CL_PCXProvider::get_alpha_mask</b></font></a> -   Get alpha mask<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2083"><tt><font color=blue><b>get_alpha_mask</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2082"><font size=+1><b>CL_PCXProvider::get_blue_mask</b></font></a> -   Get blue mask<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2082"><tt><font color=blue><b>get_blue_mask</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2089"><font size=+1><b>CL_PCXProvider::get_data</b></font></a> -   Returns the image data. Provider must be locked before pointer is valid.<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt>*</tt> <a href="CL_PCXProvider.html#2089"><tt><font color=blue><b>get_data</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2084"><font size=+1><b>CL_PCXProvider::get_depth</b></font></a> -   Get depth<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2084"><tt><font color=blue><b>get_depth</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2081"><font size=+1><b>CL_PCXProvider::get_green_mask</b></font></a> -   Get green mask<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2081"><tt><font color=blue><b>get_green_mask</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2078"><font size=+1><b>CL_PCXProvider::get_height</b></font></a> -   Returns the height of the image.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2078"><tt><font color=blue><b>get_height</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2079"><font size=+1><b>CL_PCXProvider::get_num_frames</b></font></a> -   Returns the number of subsprites in the image.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2079"><tt><font color=blue><b>get_num_frames</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2085"><font size=+1><b>CL_PCXProvider::get_palette</b></font></a> -   Returns the palette used by the image. NULL if system palette.<br><tt><tt>virtual</tt> <a href="CL_Palette.html"><tt><font color=navy><b>CL_Palette</b></font></tt></a>*</tt> <a href="CL_PCXProvider.html#2085"><tt><font color=blue><b>get_palette</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2074"><font size=+1><b>CL_PCXProvider::get_pitch</b></font></a> -   Returns the pitch of the image (bytes per line).<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2074"><tt><font color=blue><b>get_pitch</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2080"><font size=+1><b>CL_PCXProvider::get_red_mask</b></font></a> -   Get red mask<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2080"><tt><font color=blue><b>get_red_mask</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2088"><font size=+1><b>CL_PCXProvider::get_src_colorkey</b></font></a> -   Returns the transparency color used, -1 if none.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2088"><tt><font color=blue><b>get_src_colorkey</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2075"><font size=+1><b>CL_PCXProvider::get_translate_x</b></font></a> -   Returns how many pixels to translate the image (X axis).<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2075"><tt><font color=blue><b>get_translate_x</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2076"><font size=+1><b>CL_PCXProvider::get_translate_y</b></font></a> -   Returns how many pixels to translate the image (Y axis).<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2076"><tt><font color=blue><b>get_translate_y</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2077"><font size=+1><b>CL_PCXProvider::get_width</b></font></a> -   Returns the width of the image.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PCXProvider.html#2077"><tt><font color=blue><b>get_width</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2086"><font size=+1><b>CL_PCXProvider::is_indexed</b></font></a> -   Is indexed<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_PCXProvider.html#2086"><tt><font color=blue><b>is_indexed</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2090"><font size=+1><b>CL_PCXProvider::perform_lock</b></font></a> -   Locks the surface provider.<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_PCXProvider.html#2090"><tt><font color=blue><b>perform_lock</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2091"><font size=+1><b>CL_PCXProvider::perform_unlock</b></font></a> -   Unlocks the surface provider.<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_PCXProvider.html#2091"><tt><font color=blue><b>perform_unlock</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2093"><font size=+1><b>CL_PCXProvider::read_data</b></font></a> -   Decodes image data<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_PCXProvider.html#2093"><tt><font color=blue><b>read_data</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2092"><font size=+1><b>CL_PCXProvider::read_header</b></font></a> -   Loads header data into class variables.  Called by read_data().<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_PCXProvider.html#2092"><tt><font color=blue><b>read_header</b></font></tt></a><tt>(<a href="CL_InputSource.html"><tt><font color=navy><b>CL_InputSource</b></font></tt></a>* <tt><font color=blue>_datafile</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2087"><font size=+1><b>CL_PCXProvider::uses_src_colorkey</b></font></a> -   Uses src colour key	<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_PCXProvider.html#2087"><tt><font color=blue><b>uses_src_colorkey</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="2073"><font size=+1><b>CL_PCXProvider::~CL_PCXProvider</b></font></a> -   PCX Provider destructor<br><tt><tt>virtual</tt> </tt> <a href="CL_PCXProvider.html#2073"><tt><font color=blue><b>~CL_PCXProvider</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<hr noshade>
<h2>Variable Member Descriptions:</h2>
<hr noshade>
</body>
</html>