Sophie

Sophie

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

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


<html>
<head><title>ClanLib Reference: CL_SpriteProvider</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_SpriteProvider</h1><p>
<b>  ClanLib datafile sprite.</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_SpriteProvider.html#2051"><tt><font color=blue><b>create</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>surface_id</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>datafile</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_SpriteProvider.html#2052"><tt><font color=blue><b>CL_SpriteProvider</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>surface_id</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</b></font></tt></a>* <tt><font color=blue>datafile</font></tt>)</tt>;</td>
<tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_SpriteProvider.html#2053"><tt><font color=blue><b>~CL_SpriteProvider</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_SpriteProvider.html#2054"><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_SpriteProvider.html#2055"><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_SpriteProvider.html#2056"><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_SpriteProvider.html#2057"><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> <a href="CL_Palette.html"><tt><font color=navy><b>CL_Palette</b></font></tt></a>*</tt> </td><td align=right><a href="CL_SpriteProvider.html#2058"><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_SpriteProvider.html#2059"><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_SpriteProvider.html#2060"><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=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_SpriteProvider.html#2061"><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_SpriteProvider.html#2062"><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_SpriteProvider.html#2063"><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_SpriteProvider.html#2064"><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_SpriteProvider.html#2065"><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>bool</font></tt></tt> </td><td align=right><a href="CL_SpriteProvider.html#2066"><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>void</font></tt>*</tt> </td><td align=right><a href="CL_SpriteProvider.html#2067"><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_SpriteProvider.html#2068"><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_SpriteProvider.html#2069"><tt><font color=blue><b>perform_unlock</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td><tr><td colspan=3><h3>protected function member index:</h3></td>
<tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_SpriteProvider.html#2050"><tt><font color=blue><b>load_data</b></font></tt></a></td><td><tt>()</tt>;</td>
<tr><td>&nbsp;</td></table>
<hr noshade>
<h2>Description:</h2>
  Used to load surfaces stored in ClanLib's datafile sprite format.<br><p>
<hr noshade>
<h2>Function Member Descriptions:</h2>
<a name="2052"><font size=+1><b>CL_SpriteProvider::CL_SpriteProvider</b></font></a> -   Constructs a surface provider that represents the sprite 'surface_id'   from the inputsource provider 'datafile'.<br><tt></tt> <a href="CL_SpriteProvider.html#2052"><tt><font color=blue><b>CL_SpriteProvider</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>surface_id</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</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="2051"><font size=+1><b>CL_SpriteProvider::create</b></font></a> -   Loads the sprite 'surface_id' from the inputsource provider 'datafile'. <br>  Creates a surface using this sprite (surfaceprovider) and returns it.<br>  This function is a easier way of typing:<br>  CL_Surface::create(new CL_Sprite(surface_id, datafile), true);<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_SpriteProvider.html#2051"><tt><font color=blue><b>create</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>std::string</font></tt>& <tt><font color=blue>surface_id</font></tt>, <a href="CL_InputSourceProvider.html"><tt><font color=navy><b>CL_InputSourceProvider</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="2064"><font size=+1><b>CL_SpriteProvider::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_SpriteProvider.html#2064"><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="2063"><font size=+1><b>CL_SpriteProvider::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_SpriteProvider.html#2063"><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="2067"><font size=+1><b>CL_SpriteProvider::get_data</b></font></a> -   Returns a pointer to the sprites image data. Can only be called between   lock() and unlock().<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt>*</tt> <a href="CL_SpriteProvider.html#2067"><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="2065"><font size=+1><b>CL_SpriteProvider::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_SpriteProvider.html#2065"><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="2062"><font size=+1><b>CL_SpriteProvider::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_SpriteProvider.html#2062"><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="2055"><font size=+1><b>CL_SpriteProvider::get_height</b></font></a> -   Returns the height of the sprite.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_SpriteProvider.html#2055"><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="2057"><font size=+1><b>CL_SpriteProvider::get_num_frames</b></font></a> -   Returns the number of subsprites in this sprite.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_SpriteProvider.html#2057"><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="2058"><font size=+1><b>CL_SpriteProvider::get_palette</b></font></a> -   Returns the palette used by the surface. NULL if the system palette is   used.<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_SpriteProvider.html#2058"><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="2056"><font size=+1><b>CL_SpriteProvider::get_pitch</b></font></a> -   Returns the pitch of the sprite.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_SpriteProvider.html#2056"><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="2061"><font size=+1><b>CL_SpriteProvider::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_SpriteProvider.html#2061"><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="2060"><font size=+1><b>CL_SpriteProvider::get_src_colorkey</b></font></a> -   Returns the transparency color used, or -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_SpriteProvider.html#2060"><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="2054"><font size=+1><b>CL_SpriteProvider::get_width</b></font></a> -   Returns the width of the sprite.<br><tt><tt>virtual</tt> <tt><font color=navy>unsigned</font></tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_SpriteProvider.html#2054"><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="2066"><font size=+1><b>CL_SpriteProvider::is_indexed</b></font></a> -   Is indexed<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_SpriteProvider.html#2066"><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="2068"><font size=+1><b>CL_SpriteProvider::perform_lock</b></font></a> -   Locks the surface provider. This causes the sprite to retrieve its   surface data from the datafile.<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_SpriteProvider.html#2068"><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="2069"><font size=+1><b>CL_SpriteProvider::perform_unlock</b></font></a> -   Unlocks the surface provider. The sprite releases its surface data when  it is called.<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_SpriteProvider.html#2069"><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="2059"><font size=+1><b>CL_SpriteProvider::uses_src_colorkey</b></font></a> -   Uses src colourkey<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_SpriteProvider.html#2059"><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="2053"><font size=+1><b>CL_SpriteProvider::~CL_SpriteProvider</b></font></a> -   Sprite Provider Destructor<br><tt><tt>virtual</tt> </tt> <a href="CL_SpriteProvider.html#2053"><tt><font color=blue><b>~CL_SpriteProvider</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>