Sophie

Sophie

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

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


<html>
<head><title>ClanLib Reference: CL_PNGProvider</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_PNGProvider</h1><p>
<b>  Surface provider that can load PNG (.png) 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: PNG (Surface Providers)
<p>
#include &lt;ClanLib/png.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_PNGProvider.html#1700"><tt><font color=blue><b>create</b></font></tt></a></td><td><tt>(<a href="CL_String.html"><tt><font color=navy><b>CL_String</b></font></tt></a> <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>=NULL, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>ignore_alphachannel</font></tt>=false)</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1701"><tt><font color=blue><b>CL_PNGProvider</b></font></tt></a></td><td><tt>(<a href="CL_String.html"><tt><font color=navy><b>CL_String</b></font></tt></a> <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> = NULL, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>ignore_alphachannel</font></tt>=false)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_PNGProvider.html#1702"><tt><font color=blue><b>~CL_PNGProvider</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><a href="CL_InputSource.html"><tt><font color=navy><b>CL_InputSource</b></font></tt></a>*</tt> </td><td align=right><a href="CL_PNGProvider.html#1703"><tt><font color=blue><b>get_input_source</b></font></tt></a></td><td><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_PNGProvider.html#1704"><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=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1705"><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_PNGProvider.html#1706"><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_PNGProvider.html#1707"><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>EPixelFormat</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1708"><tt><font color=blue><b>get_pixel_format</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_PNGProvider.html#1709"><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=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1710"><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>bool</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1711"><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=purple>bool</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1712"><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=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1713"><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_PNGProvider.html#1714"><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_PNGProvider.html#1715"><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_PNGProvider.html#1716"><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_PNGProvider.html#1717"><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> <tt><font color=purple>void</font></tt>*</tt> </td><td align=right><a href="CL_PNGProvider.html#1718"><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_PNGProvider.html#1719"><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_PNGProvider.html#1720"><tt><font color=blue><b>perform_unlock</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt>static</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1721"><tt><font color=blue><b>pngread_file</b></font></tt></a></td><td><tt>(<tt><font color=navy>png_structp</font></tt> <tt><font color=blue>png_ptr</font></tt>, <tt><font color=navy>png_bytep</font></tt> <tt><font color=blue>data</font></tt>, <tt><font color=navy>png_size_t</font></tt> <tt><font color=blue>length</font></tt>)</tt>;</td>
<tr><td>&nbsp;</td><tr><td colspan=3><h3>private function member index:</h3></td>
<tr valign=top><td align=left><h3>Implementation:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1738"><tt><font color=blue><b>read_data</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1739"><tt><font color=blue><b>read_data_rgb</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1740"><tt><font color=blue><b>read_data_rgba</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1741"><tt><font color=blue><b>read_data_grayscale</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1742"><tt><font color=blue><b>read_data_grayscale_alpha</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_PNGProvider.html#1743"><tt><font color=blue><b>read_data_palette</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
<p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="1701"><font size=+1><b>CL_PNGProvider::CL_PNGProvider</b></font></a> -   Constructs a surface provider that can read PNG files.<br><tt></tt> <a href="CL_PNGProvider.html#1701"><tt><font color=blue><b>CL_PNGProvider</b></font></tt></a><tt>(<a href="CL_String.html"><tt><font color=navy><b>CL_String</b></font></tt></a> <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> = NULL, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>ignore_alphachannel</font></tt>=false)</tt>;<br><blockquote>  name - Name of the PNG file to load.<br>  provider - Input source provider that delivers the PNG file.<br>  transparent - True if a transparency color should be used.<br>  ignore_alphachannel - True if the alpha component should be ignored.<br>  trans_red - Red component of the transparency color.<br>  trans_green - Green component of the transparency color.<br>  trans_blue - blue component of the transparency color.</blockquote>
<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="1700"><font size=+1><b>CL_PNGProvider::create</b></font></a> -   Loads the PNG file 'handle' from the inputsource provider 'provider. <br>  Creates a <a href="CL_Surface.html">CL_Surface</a> using the PNG image and returns it.<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_PNGProvider.html#1700"><tt><font color=blue><b>create</b></font></tt></a><tt>(<a href="CL_String.html"><tt><font color=navy><b>CL_String</b></font></tt></a> <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>=NULL, <tt><font color=purple>bool</font></tt> <tt><font color=blue>transparent</font></tt>=true, <tt><font color=purple>bool</font></tt> <tt><font color=blue>ignore_alphachannel</font></tt>=false)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="1716"><font size=+1><b>CL_PNGProvider::get_alpha_mask</b></font></a> -   Returns the alpha mask by the target.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1716"><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="1715"><font size=+1><b>CL_PNGProvider::get_blue_mask</b></font></a> -   Returns the blue color mask by the target.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1715"><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="1718"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1718"><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="1717"><font size=+1><b>CL_PNGProvider::get_depth</b></font></a> -   Returns the bit depth of the surface provider<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1717"><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="1714"><font size=+1><b>CL_PNGProvider::get_green_mask</b></font></a> -   Returns the green color mask by the target.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1714"><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="1706"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1706"><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="1703"><font size=+1><b>CL_PNGProvider::get_input_source</b></font></a> -   returns Pointer to <a href="CL_InputSource.html">CL_InputSource</a><br>  (used by libpng-callback CL_PNGProvider::pngread_file() )<br><tt><a href="CL_InputSource.html"><tt><font color=navy><b>CL_InputSource</b></font></tt></a>*</tt> <a href="CL_PNGProvider.html#1703"><tt><font color=blue><b>get_input_source</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="1707"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1707"><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="1709"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1709"><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="1704"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1704"><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="1708"><font size=+1><b>CL_PNGProvider::get_pixel_format</b></font></a> -   Returns the pixelformat used by the image.<br><tt><tt>virtual</tt> <tt><font color=navy>EPixelFormat</font></tt></tt> <a href="CL_PNGProvider.html#1708"><tt><font color=blue><b>get_pixel_format</b></font></tt></a><tt>() <tt>const</tt></tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="1713"><font size=+1><b>CL_PNGProvider::get_red_mask</b></font></a> -   Returns the red color mask used by the target.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1713"><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="1710"><font size=+1><b>CL_PNGProvider::get_src_colorkey</b></font></a> -   Returns the transparency color used.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_PNGProvider.html#1710"><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="1705"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1705"><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="1712"><font size=+1><b>CL_PNGProvider::is_indexed</b></font></a> -   Returns whether the target uses an indexed color mode or not.<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_PNGProvider.html#1712"><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="1719"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1719"><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="1720"><font size=+1><b>CL_PNGProvider::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_PNGProvider.html#1720"><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="1721"><font size=+1><b>CL_PNGProvider::pngread_file</b></font></a> -   Callback used by libpng to retrieve the filedata. <br>  (calls get_input_source()-&gt;read_uchar8())<br><tt><tt>static</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_PNGProvider.html#1721"><tt><font color=blue><b>pngread_file</b></font></tt></a><tt>(<tt><font color=navy>png_structp</font></tt> <tt><font color=blue>png_ptr</font></tt>, <tt><font color=navy>png_bytep</font></tt> <tt><font color=blue>data</font></tt>, <tt><font color=navy>png_size_t</font></tt> <tt><font color=blue>length</font></tt>)</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br>
<a name="1711"><font size=+1><b>CL_PNGProvider::uses_src_colorkey</b></font></a> -   Returns whether a source colorkey is used.<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_PNGProvider.html#1711"><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>
<hr noshade>
<h2>Variable Member Descriptions:</h2>
<hr noshade>
</body>
</html>