Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > f00c83953c7eb23ee3c18f4f35d8eb6b > files > 267

sfml2-doc-2.0-0.1mdv2010.2.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="tabs.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="logo">
            <img src="./logo.jpg" width="770" height="200" title="SFML home" alt="SFML logo" />
        </div>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.htm"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.htm"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.htm"><span>Classes</span></a></li>
      <li><a href="files.htm"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.htm"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.htm"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.htm"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.htm"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><b>sf</b>::<a class="el" href="classsf_1_1Sprite.htm">Sprite</a>
  </div>
</div>
<div class="contents">
<h1>sf::Sprite Class Reference<br/>
<small>
[<a class="el" href="group__graphics.htm">Graphics module</a>]</small>
</h1><!-- doxytag: class="sf::Sprite" --><!-- doxytag: inherits="sf::Drawable" -->
<p><a class="el" href="classsf_1_1Drawable.htm" title="Abstract base class for objects that can be drawn to a render target.">Drawable</a> representation of a texture, with its own transformations, color, blend mode, etc.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Sprite_8hpp_source.htm">Sprite.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::Sprite:</div>
<div class="dynsection">
 <div class="center">
  <img src="classsf_1_1Sprite.png" usemap="#sf::Sprite_map" alt=""/>
  <map id="sf::Sprite_map" name="sf::Sprite_map">
<area href="classsf_1_1Drawable.htm" alt="sf::Drawable" shape="rect" coords="0,0,82,24"/>
</map>
 </div>
</div>

<p><a href="classsf_1_1Sprite-members.htm">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a92559fbca895a96758abf5eabab96984">Sprite</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#a92559fbca895a96758abf5eabab96984"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a2a9fca374d7abf084bb1c143a879ff4a">Sprite</a> (const <a class="el" href="classsf_1_1Texture.htm">Texture</a> &amp;texture)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct the sprite from a source texture.  <a href="#a2a9fca374d7abf084bb1c143a879ff4a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#ae5ef49eea88de40b970460ecfc1782c4">SetTexture</a> (const <a class="el" href="classsf_1_1Texture.htm">Texture</a> &amp;texture, bool adjustToNewSize=false)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the source texture of the sprite.  <a href="#ae5ef49eea88de40b970460ecfc1782c4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#aae8e8be077534c0b8704e59b0ea4cf9a">SetSubRect</a> (const <a class="el" href="classsf_1_1Rect.htm">IntRect</a> &amp;rectangle)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the part of the texture that the sprite will display.  <a href="#aae8e8be077534c0b8704e59b0ea4cf9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a2da987063f8e30aa9c3022b52f6d8f9c">Resize</a> (float width, float height)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the size of the sprite.  <a href="#a2da987063f8e30aa9c3022b52f6d8f9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a1976099a393a390dc9b792d2d7d4dcc5">Resize</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the size of the sprite.  <a href="#a1976099a393a390dc9b792d2d7d4dcc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a5edd7f661b2b45c29a13abec47efae15">FlipX</a> (bool flipped)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flip the sprite horizontally.  <a href="#a5edd7f661b2b45c29a13abec47efae15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a1d641d69a2f66d6eaf8d57228999828d">FlipY</a> (bool flipped)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flip the sprite vertically.  <a href="#a1d641d69a2f66d6eaf8d57228999828d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Texture.htm">Texture</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a570dceb9617da02d3a26128bff4746cc">GetTexture</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the source texture of the sprite.  <a href="#a570dceb9617da02d3a26128bff4746cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Rect.htm">IntRect</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#ad29401fa4c1507ceee3456f32ecc6d5e">GetSubRect</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the region of the texture displayed by the sprite.  <a href="#ad29401fa4c1507ceee3456f32ecc6d5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a386e09c5f321a69707393851ae026f7e">GetSize</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the global size of the sprite.  <a href="#a386e09c5f321a69707393851ae026f7e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2">SetPosition</a> (float x, float y)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the position of the object.  <a href="#a84c8c18f14c8985f4d219298dfa16fe2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#aed916b5f46bd71d4222d92d4df17c6c0">SetPosition</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;position)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the position of the object.  <a href="#aed916b5f46bd71d4222d92d4df17c6c0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#aadf7f9963121f105fbfd01ef1854274d">SetX</a> (float x)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the X position of the object.  <a href="#aadf7f9963121f105fbfd01ef1854274d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a2c3820004d0b70acd1a43163ceb89108">SetY</a> (float y)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the Y position of the object.  <a href="#a2c3820004d0b70acd1a43163ceb89108"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576">SetScale</a> (float factorX, float factorY)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the scale factors of the object.  <a href="#a0ca6c6cd466339f439f0439e1a61f576"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a1ba9eec16cabacd6fd47d2567748d47c">SetScale</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;factors)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the scale factors of the object.  <a href="#a1ba9eec16cabacd6fd47d2567748d47c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a4b151b01bde5056dcb225a0ceb1dc56b">SetScaleX</a> (float factor)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the X scale factor of the object.  <a href="#a4b151b01bde5056dcb225a0ceb1dc56b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#ae030c576aabe7c0cbe5ca1d6f412b906">SetScaleY</a> (float factor)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the Y scale factor of the object.  <a href="#ae030c576aabe7c0cbe5ca1d6f412b906"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#affb3db405124b442b8f6e688f074dee0">SetOrigin</a> (float x, float y)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the local origin of the object.  <a href="#affb3db405124b442b8f6e688f074dee0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a121726785914ee0b3cfb93e015eb0d03">SetOrigin</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;origin)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the local origin of the object.  <a href="#a121726785914ee0b3cfb93e015eb0d03"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a32b161223f46faa281428082d4435223">SetRotation</a> (float angle)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the orientation of the object.  <a href="#a32b161223f46faa281428082d4435223"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a43246dac44655361c14407bdfd03c943">SetColor</a> (const <a class="el" href="classsf_1_1Color.htm">Color</a> &amp;color)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the global color of the object.  <a href="#a43246dac44655361c14407bdfd03c943"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a107855befd522fa3ce5cf6a704f24204">SetBlendMode</a> (<a class="el" href="group__graphics.htm#ga1a2fa89de4bb0d82b2eb30399fe575ca">Blend::Mode</a> mode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the blending mode of the object.  <a href="#a107855befd522fa3ce5cf6a704f24204"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0">GetPosition</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the position of the object.  <a href="#a5961d78ed4b550092c90de500cc04fe0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a6ddb66a4509565b05bf30ec1609c2a55">GetScale</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current scale of the object.  <a href="#a6ddb66a4509565b05bf30ec1609c2a55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a736fb2bc24ac9394b998dd79ae77bf36">GetOrigin</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the local origin of the object.  <a href="#a736fb2bc24ac9394b998dd79ae77bf36"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a4e82bec096673bccf7ceac5207617017">GetRotation</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the orientation of the object.  <a href="#a4e82bec096673bccf7ceac5207617017"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Color.htm">Color</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a9ebc2bd85e3e97a0ec18dcb18bb6128f">GetColor</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the color of the object.  <a href="#a9ebc2bd85e3e97a0ec18dcb18bb6128f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__graphics.htm#ga1a2fa89de4bb0d82b2eb30399fe575ca">Blend::Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#ab6446c4717a2800cad85db55cb55409a">GetBlendMode</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the blend mode of the object.  <a href="#ab6446c4717a2800cad85db55cb55409a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#ae0b7b653067d51b9d55ec84c88938cfd">Move</a> (float offsetX, float offsetY)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the object by a given offset.  <a href="#ae0b7b653067d51b9d55ec84c88938cfd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a968666b142af3219622b5011b6cdd96a">Move</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;offset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the object by a given offset.  <a href="#a968666b142af3219622b5011b6cdd96a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#af14b17e4f5a73d2b1457707734643550">Scale</a> (float factorX, float factorY)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scale the object.  <a href="#af14b17e4f5a73d2b1457707734643550"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#abccf607595df1e6f2b2682e899e66b5d">Scale</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;factor)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scale the object.  <a href="#abccf607595df1e6f2b2682e899e66b5d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a9e2d796314a871dfc19597c68084cf4c">Rotate</a> (float angle)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rotate the object.  <a href="#a9e2d796314a871dfc19597c68084cf4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a0db0514c07c903009b8b5c26884a9a51">TransformToLocal</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;point) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Transform a point in object local coordinates.  <a href="#a0db0514c07c903009b8b5c26884a9a51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#ac48af98be80280ceea40b76777a9f599">TransformToGlobal</a> (const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;point) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Transform a local point in global coordinates.  <a href="#ac48af98be80280ceea40b76777a9f599"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Sprite.htm#a7c973ce6cb84587298e692cef502aa6e">Render</a> (<a class="el" href="classsf_1_1RenderTarget.htm">RenderTarget</a> &amp;target, <a class="el" href="classsf_1_1Renderer.htm">Renderer</a> &amp;renderer) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the object to a render target.  <a href="#a7c973ce6cb84587298e692cef502aa6e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Matrix3.htm">Matrix3</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#ac9ada41547bee7761836f36619712d73">GetMatrix</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the transform matrix of the object.  <a href="#ac9ada41547bee7761836f36619712d73"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Matrix3.htm">Matrix3</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a7de45b8b56658643d86cffdfdaf3366e">GetInverseMatrix</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the inverse transform matrix of the object.  <a href="#a7de45b8b56658643d86cffdfdaf3366e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classsf_1_1Drawable.htm" title="Abstract base class for objects that can be drawn to a render target.">Drawable</a> representation of a texture, with its own transformations, color, blend mode, etc. </p>
<p><a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> is a drawable class that allows to easily display a texture (or a part of it) on a render target.</p>
<p>It inherits all the functions from <a class="el" href="classsf_1_1Drawable.htm" title="Abstract base class for objects that can be drawn to a render target.">sf::Drawable</a>: position, rotation, scale, origin, global color and blend mode. It also adds sprite-specific properties such as the texture to use, the part of it to display, and some convenience functions to flip or resize the sprite.</p>
<p><a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> works in combination with the <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> class, which loads and provides the pixel data of a given texture.</p>
<p>The separation of <a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> and <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> allows more flexibility and better performances: indeed a <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> is a heavy resource, and any operation on it is slow (often too slow for real-time applications). On the other side, a <a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> is a lightweight object which can use the pixel data of a <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> and draw it with its own transformation / color / blending attributes.</p>
<p>It is important to note that the <a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> instance doesn't copy the texture that it uses, it only keeps a reference to it. Thus, a <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> must not be destructed while it is used by a <a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> (i.e. never write a function that uses a local <a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> instance for creating a sprite).</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// Declare and load a texture</span>
 <a class="code" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> texture;
 texture.<a class="code" href="classsf_1_1Texture.htm#a363aa0e87131a75f9850076cdd2334b9" title="Load the texture from a file on disk.">LoadFromFile</a>(<span class="stringliteral">&quot;texture.png&quot;</span>);
 
 <span class="comment">// Create a sprite</span>
 <a class="code" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> sprite;
 sprite.<a class="code" href="classsf_1_1Sprite.htm#ae5ef49eea88de40b970460ecfc1782c4" title="Change the source texture of the sprite.">SetTexture</a>(texture);
 sprite.<a class="code" href="classsf_1_1Sprite.htm#aae8e8be077534c0b8704e59b0ea4cf9a" title="Set the part of the texture that the sprite will display.">SetSubRect</a>(<a class="code" href="classsf_1_1Rect.htm">sf::IntRect</a>(10, 10, 50, 30));
 sprite.<a class="code" href="classsf_1_1Sprite.htm#a2da987063f8e30aa9c3022b52f6d8f9c" title="Change the size of the sprite.">Resize</a>(100, 60);

 <span class="comment">// Display it</span>
 window.Draw(sprite); <span class="comment">// window is a sf::RenderWindow</span>
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> </dd></dl>

<p>Definition at line <a class="el" href="Sprite_8hpp_source.htm#l00045">45</a> of file <a class="el" href="Sprite_8hpp_source.htm">Sprite.hpp</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a92559fbca895a96758abf5eabab96984"></a><!-- doxytag: member="sf::Sprite::Sprite" ref="a92559fbca895a96758abf5eabab96984" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::Sprite::Sprite </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<p>Creates an empty sprite with no source texture. </p>

</div>
</div>
<a class="anchor" id="a2a9fca374d7abf084bb1c143a879ff4a"></a><!-- doxytag: member="sf::Sprite::Sprite" ref="a2a9fca374d7abf084bb1c143a879ff4a" args="(const Texture &amp;texture)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sf::Sprite::Sprite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Texture.htm">Texture</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>texture</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct the sprite from a source texture. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#ae5ef49eea88de40b970460ecfc1782c4" title="Change the source texture of the sprite.">SetTexture</a> </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5edd7f661b2b45c29a13abec47efae15"></a><!-- doxytag: member="sf::Sprite::FlipX" ref="a5edd7f661b2b45c29a13abec47efae15" args="(bool flipped)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::FlipX </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>flipped</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flip the sprite horizontally. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flipped</em>&nbsp;</td><td>True to flip the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a1d641d69a2f66d6eaf8d57228999828d" title="Flip the sprite vertically.">FlipY</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1d641d69a2f66d6eaf8d57228999828d"></a><!-- doxytag: member="sf::Sprite::FlipY" ref="a1d641d69a2f66d6eaf8d57228999828d" args="(bool flipped)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::FlipY </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>flipped</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flip the sprite vertically. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flipped</em>&nbsp;</td><td>True to flip the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a5edd7f661b2b45c29a13abec47efae15" title="Flip the sprite horizontally.">FlipX</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab6446c4717a2800cad85db55cb55409a"></a><!-- doxytag: member="sf::Sprite::GetBlendMode" ref="ab6446c4717a2800cad85db55cb55409a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__graphics.htm#ga1a2fa89de4bb0d82b2eb30399fe575ca">Blend::Mode</a> sf::Drawable::GetBlendMode </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the blend mode of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current blend mode</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a107855befd522fa3ce5cf6a704f24204" title="Set the blending mode of the object.">SetBlendMode</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9ebc2bd85e3e97a0ec18dcb18bb6128f"></a><!-- doxytag: member="sf::Sprite::GetColor" ref="a9ebc2bd85e3e97a0ec18dcb18bb6128f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Color.htm">Color</a>&amp; sf::Drawable::GetColor </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the color of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current color</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a43246dac44655361c14407bdfd03c943" title="Set the global color of the object.">SetColor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7de45b8b56658643d86cffdfdaf3366e"></a><!-- doxytag: member="sf::Sprite::GetInverseMatrix" ref="a7de45b8b56658643d86cffdfdaf3366e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Matrix3.htm">Matrix3</a>&amp; sf::Drawable::GetInverseMatrix </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected, inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the inverse transform matrix of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Inverse transform matrix</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ac9ada41547bee7761836f36619712d73" title="Get the transform matrix of the object.">GetMatrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac9ada41547bee7761836f36619712d73"></a><!-- doxytag: member="sf::Sprite::GetMatrix" ref="ac9ada41547bee7761836f36619712d73" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Matrix3.htm">Matrix3</a>&amp; sf::Drawable::GetMatrix </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected, inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the transform matrix of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Transform matrix</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a7de45b8b56658643d86cffdfdaf3366e" title="Get the inverse transform matrix of the object.">GetInverseMatrix</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a736fb2bc24ac9394b998dd79ae77bf36"></a><!-- doxytag: member="sf::Sprite::GetOrigin" ref="a736fb2bc24ac9394b998dd79ae77bf36" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&amp; sf::Drawable::GetOrigin </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the local origin of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current origin</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#affb3db405124b442b8f6e688f074dee0" title="Set the local origin of the object.">SetOrigin</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a5961d78ed4b550092c90de500cc04fe0"></a><!-- doxytag: member="sf::Sprite::GetPosition" ref="a5961d78ed4b550092c90de500cc04fe0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&amp; sf::Drawable::GetPosition </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the position of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current position</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4e82bec096673bccf7ceac5207617017"></a><!-- doxytag: member="sf::Sprite::GetRotation" ref="a4e82bec096673bccf7ceac5207617017" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sf::Drawable::GetRotation </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the orientation of the object. </p>
<p>The rotation is always in the range [0, 360].</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current rotation, in degrees</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a32b161223f46faa281428082d4435223" title="Set the orientation of the object.">SetRotation</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6ddb66a4509565b05bf30ec1609c2a55"></a><!-- doxytag: member="sf::Sprite::GetScale" ref="a6ddb66a4509565b05bf30ec1609c2a55" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a>&amp; sf::Drawable::GetScale </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the current scale of the object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current scale factors</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576" title="Set the scale factors of the object.">SetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a386e09c5f321a69707393851ae026f7e"></a><!-- doxytag: member="sf::Sprite::GetSize" ref="a386e09c5f321a69707393851ae026f7e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> sf::Sprite::GetSize </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the global size of the sprite. </p>
<p>This function is a shortcut that multiplies the size of the subrect by the scale factors.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Size of the sprite</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a2da987063f8e30aa9c3022b52f6d8f9c" title="Change the size of the sprite.">Resize</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad29401fa4c1507ceee3456f32ecc6d5e"></a><!-- doxytag: member="sf::Sprite::GetSubRect" ref="ad29401fa4c1507ceee3456f32ecc6d5e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Rect.htm">IntRect</a>&amp; sf::Sprite::GetSubRect </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the region of the texture displayed by the sprite. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Rectangle defining the region of the texture</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#aae8e8be077534c0b8704e59b0ea4cf9a" title="Set the part of the texture that the sprite will display.">SetSubRect</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a570dceb9617da02d3a26128bff4746cc"></a><!-- doxytag: member="sf::Sprite::GetTexture" ref="a570dceb9617da02d3a26128bff4746cc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classsf_1_1Texture.htm">Texture</a>* sf::Sprite::GetTexture </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the source texture of the sprite. </p>
<p>If the sprite has no source texture, or if the texture doesn't exist anymore, a NULL pointer is returned. The returned pointer is const, which means that you can't modify the texture when you retrieve it with this function.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the sprite's texture</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#ae5ef49eea88de40b970460ecfc1782c4" title="Change the source texture of the sprite.">SetTexture</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a968666b142af3219622b5011b6cdd96a"></a><!-- doxytag: member="sf::Sprite::Move" ref="a968666b142af3219622b5011b6cdd96a" args="(const Vector2f &amp;offset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::Move </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Move the object by a given offset. </p>
<p>This function adds to the current position of the object, unlike SetPosition which overwrites it. Thus, it is equivalent to the following code: </p>
<div class="fragment"><pre class="fragment"> <span class="keywordtype">object</span>.SetPosition(<span class="keywordtype">object</span>.<a class="code" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0" title="Get the position of the object.">GetPosition</a>() + offset);
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>Offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae0b7b653067d51b9d55ec84c88938cfd"></a><!-- doxytag: member="sf::Sprite::Move" ref="ae0b7b653067d51b9d55ec84c88938cfd" args="(float offsetX, float offsetY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::Move </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>offsetY</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Move the object by a given offset. </p>
<p>This function adds to the current position of the object, unlike SetPosition which overwrites it. Thus, it is equivalent to the following code: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classsf_1_1Vector2.htm">sf::Vector2f</a> pos = <span class="keywordtype">object</span>.GetPosition();
 <span class="keywordtype">object</span>.SetPosition(pos.<a class="code" href="classsf_1_1Vector2.htm#a1e6ad77fa155f3753bfb92699bd28141" title="X coordinate of the vector.">x</a> + offsetX, pos.<a class="code" href="classsf_1_1Vector2.htm#a420f2481b015f4eb929c75f2af564299" title="Y coordinate of the vector.">y</a> + offsetY);
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offsetX</em>&nbsp;</td><td>X offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offsetY</em>&nbsp;</td><td>Y offset</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7c973ce6cb84587298e692cef502aa6e"></a><!-- doxytag: member="sf::Sprite::Render" ref="a7c973ce6cb84587298e692cef502aa6e" args="(RenderTarget &amp;target, Renderer &amp;renderer) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void sf::Sprite::Render </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsf_1_1RenderTarget.htm">RenderTarget</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsf_1_1Renderer.htm">Renderer</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>renderer</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draw the object to a render target. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td>Render target </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>renderer</em>&nbsp;</td><td><a class="el" href="classsf_1_1Renderer.htm" title="Handles the low-level rendering (states and geometry).">Renderer</a> providing low-level rendering commands </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classsf_1_1Drawable.htm">sf::Drawable</a>.</p>

</div>
</div>
<a class="anchor" id="a1976099a393a390dc9b792d2d7d4dcc5"></a><!-- doxytag: member="sf::Sprite::Resize" ref="a1976099a393a390dc9b792d2d7d4dcc5" args="(const Vector2f &amp;size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::Resize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>size</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Change the size of the sprite. </p>
<p>This function is just a shortcut that calls SetScale with the proper values, calculated from the size of the current subrect. If <em>size.x</em> or <em>size.y</em> is not strictly positive, this functions does nothing.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>New size of the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a386e09c5f321a69707393851ae026f7e" title="Get the global size of the sprite.">GetSize</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a2da987063f8e30aa9c3022b52f6d8f9c"></a><!-- doxytag: member="sf::Sprite::Resize" ref="a2da987063f8e30aa9c3022b52f6d8f9c" args="(float width, float height)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::Resize </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>height</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Change the size of the sprite. </p>
<p>This function is just a shortcut that calls SetScale with the proper values, calculated from the size of the current subrect. If <em>width</em> or <em>height</em> is not strictly positive, this functions does nothing.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>New width of the sprite </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>New height of the sprite</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a386e09c5f321a69707393851ae026f7e" title="Get the global size of the sprite.">GetSize</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9e2d796314a871dfc19597c68084cf4c"></a><!-- doxytag: member="sf::Sprite::Rotate" ref="a9e2d796314a871dfc19597c68084cf4c" args="(float angle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::Rotate </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>angle</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotate the object. </p>
<p>This function ads to the current rotation of the object, unlike SetRotation which overwrites it. Thus, it is equivalent to the following code: </p>
<div class="fragment"><pre class="fragment"> <span class="keywordtype">object</span>.SetRotation(<span class="keywordtype">object</span>.<a class="code" href="classsf_1_1Drawable.htm#a4e82bec096673bccf7ceac5207617017" title="Get the orientation of the object.">GetRotation</a>() + angle);
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>Angle of rotation, in degrees </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abccf607595df1e6f2b2682e899e66b5d"></a><!-- doxytag: member="sf::Sprite::Scale" ref="abccf607595df1e6f2b2682e899e66b5d" args="(const Vector2f &amp;factor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::Scale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>factor</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Scale the object. </p>
<p>This function multiplies the current scale of the object, unlike SetScale which overwrites it. Thus, it is equivalent to the following code: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classsf_1_1Vector2.htm">sf::Vector2f</a> scale = <span class="keywordtype">object</span>.GetScale();
 <span class="keywordtype">object</span>.SetScale(scale.<a class="code" href="classsf_1_1Vector2.htm#a1e6ad77fa155f3753bfb92699bd28141" title="X coordinate of the vector.">x</a> * factor.x, scale.<a class="code" href="classsf_1_1Vector2.htm#a420f2481b015f4eb929c75f2af564299" title="Y coordinate of the vector.">y</a> * factor.y);
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factor</em>&nbsp;</td><td>Scale factors</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576" title="Set the scale factors of the object.">SetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af14b17e4f5a73d2b1457707734643550"></a><!-- doxytag: member="sf::Sprite::Scale" ref="af14b17e4f5a73d2b1457707734643550" args="(float factorX, float factorY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::Scale </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factorX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factorY</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Scale the object. </p>
<p>This function multiplies the current scale of the object, unlike SetScale which overwrites it. Thus, it is equivalent to the following code: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classsf_1_1Vector2.htm">sf::Vector2f</a> scale = <span class="keywordtype">object</span>.GetScale();
 <span class="keywordtype">object</span>.SetScale(scale.<a class="code" href="classsf_1_1Vector2.htm#a1e6ad77fa155f3753bfb92699bd28141" title="X coordinate of the vector.">x</a> * factorX, scale.<a class="code" href="classsf_1_1Vector2.htm#a420f2481b015f4eb929c75f2af564299" title="Y coordinate of the vector.">y</a> * factorY);
</pre></div><dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factorX</em>&nbsp;</td><td>Horizontal scale factor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factorY</em>&nbsp;</td><td>Vertical scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576" title="Set the scale factors of the object.">SetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a107855befd522fa3ce5cf6a704f24204"></a><!-- doxytag: member="sf::Sprite::SetBlendMode" ref="a107855befd522fa3ce5cf6a704f24204" args="(Blend::Mode mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetBlendMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__graphics.htm#ga1a2fa89de4bb0d82b2eb30399fe575ca">Blend::Mode</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the blending mode of the object. </p>
<p>This property defines how the pixels of an object are blended with the pixels of the render target to which it is drawn. To know more about the blending modes available, see the sf::Blend::Mode enum. The default blend mode is Blend::Alpha.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>New blending mode</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ab6446c4717a2800cad85db55cb55409a" title="Get the blend mode of the object.">GetBlendMode</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a43246dac44655361c14407bdfd03c943"></a><!-- doxytag: member="sf::Sprite::SetColor" ref="a43246dac44655361c14407bdfd03c943" args="(const Color &amp;color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetColor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Color.htm">Color</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>color</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the global color of the object. </p>
<p>This global color affects the entire object, and modulates (multiplies) its original pixels. The default color is white.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>color</em>&nbsp;</td><td>New color</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a9ebc2bd85e3e97a0ec18dcb18bb6128f" title="Get the color of the object.">GetColor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a121726785914ee0b3cfb93e015eb0d03"></a><!-- doxytag: member="sf::Sprite::SetOrigin" ref="a121726785914ee0b3cfb93e015eb0d03" args="(const Vector2f &amp;origin)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetOrigin </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>origin</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the local origin of the object. </p>
<p>The origin of an object defines the center point for all transformations (position, scale, rotation). The coordinates of this point must be relative to the top-left corner of the object, and ignore all transformations (position, scale, rotation). The default origin of a drawable object is (0, 0).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>origin</em>&nbsp;</td><td>New origin</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a736fb2bc24ac9394b998dd79ae77bf36" title="Get the local origin of the object.">GetOrigin</a> </dd></dl>

</div>
</div>
<a class="anchor" id="affb3db405124b442b8f6e688f074dee0"></a><!-- doxytag: member="sf::Sprite::SetOrigin" ref="affb3db405124b442b8f6e688f074dee0" args="(float x, float y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetOrigin </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the local origin of the object. </p>
<p>The origin of an object defines the center point for all transformations (position, scale, rotation). The coordinates of this point must be relative to the top-left corner of the object, and ignore all transformations (position, scale, rotation). The default origin of a drawable object is (0, 0).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>X coordinate of the new origin </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>Y coordinate of the new origin</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a736fb2bc24ac9394b998dd79ae77bf36" title="Get the local origin of the object.">GetOrigin</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aed916b5f46bd71d4222d92d4df17c6c0"></a><!-- doxytag: member="sf::Sprite::SetPosition" ref="aed916b5f46bd71d4222d92d4df17c6c0" args="(const Vector2f &amp;position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetPosition </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>position</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the position of the object. </p>
<p>This function completely overwrites the previous position. See Move to apply an offset based on the previous position instead. The default position of a drawable object is (0, 0).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>New position</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ae0b7b653067d51b9d55ec84c88938cfd" title="Move the object by a given offset.">Move</a>, <a class="el" href="classsf_1_1Drawable.htm#aadf7f9963121f105fbfd01ef1854274d" title="Set the X position of the object.">SetX</a>, <a class="el" href="classsf_1_1Drawable.htm#a2c3820004d0b70acd1a43163ceb89108" title="Set the Y position of the object.">SetY</a>, <a class="el" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0" title="Get the position of the object.">GetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a84c8c18f14c8985f4d219298dfa16fe2"></a><!-- doxytag: member="sf::Sprite::SetPosition" ref="a84c8c18f14c8985f4d219298dfa16fe2" args="(float x, float y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetPosition </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the position of the object. </p>
<p>This function completely overwrites the previous position. See Move to apply an offset based on the previous position instead. The default position of a drawable object is (0, 0).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>X coordinate of the new position </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>Y coordinate of the new position</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ae0b7b653067d51b9d55ec84c88938cfd" title="Move the object by a given offset.">Move</a>, <a class="el" href="classsf_1_1Drawable.htm#aadf7f9963121f105fbfd01ef1854274d" title="Set the X position of the object.">SetX</a>, <a class="el" href="classsf_1_1Drawable.htm#a2c3820004d0b70acd1a43163ceb89108" title="Set the Y position of the object.">SetY</a>, <a class="el" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0" title="Get the position of the object.">GetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a32b161223f46faa281428082d4435223"></a><!-- doxytag: member="sf::Sprite::SetRotation" ref="a32b161223f46faa281428082d4435223" args="(float angle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetRotation </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>angle</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the orientation of the object. </p>
<p>This function completely overwrites the previous rotation. See Rotate to add an angle based on the previous rotation instead. The default rotation of a drawable object is 0.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>New rotation, in degrees</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a9e2d796314a871dfc19597c68084cf4c" title="Rotate the object.">Rotate</a>, <a class="el" href="classsf_1_1Drawable.htm#a4e82bec096673bccf7ceac5207617017" title="Get the orientation of the object.">GetRotation</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1ba9eec16cabacd6fd47d2567748d47c"></a><!-- doxytag: member="sf::Sprite::SetScale" ref="a1ba9eec16cabacd6fd47d2567748d47c" args="(const Vector2f &amp;factors)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetScale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>factors</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the scale factors of the object. </p>
<p><em>scale.x</em> and <em>scale.y</em> must be strictly positive, otherwise they are ignored. This function completely overwrites the previous scale. See Scale to add a factor based on the previous scale instead. The default scale of a drawable object is (1, 1).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factors</em>&nbsp;</td><td>New scale factors</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#af14b17e4f5a73d2b1457707734643550" title="Scale the object.">Scale</a>, <a class="el" href="classsf_1_1Drawable.htm#a4b151b01bde5056dcb225a0ceb1dc56b" title="Set the X scale factor of the object.">SetScaleX</a>, <a class="el" href="classsf_1_1Drawable.htm#ae030c576aabe7c0cbe5ca1d6f412b906" title="Set the Y scale factor of the object.">SetScaleY</a>, <a class="el" href="classsf_1_1Drawable.htm#a6ddb66a4509565b05bf30ec1609c2a55" title="Get the current scale of the object.">GetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0ca6c6cd466339f439f0439e1a61f576"></a><!-- doxytag: member="sf::Sprite::SetScale" ref="a0ca6c6cd466339f439f0439e1a61f576" args="(float factorX, float factorY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetScale </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factorX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factorY</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the scale factors of the object. </p>
<p><em>factorX</em> and <em>factorY</em> must be strictly positive, otherwise they are ignored. This function completely overwrites the previous scale. See Scale to add a factor based on the previous scale instead. The default scale of a drawable object is (1, 1).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factorX</em>&nbsp;</td><td>New horizontal scale factor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factorY</em>&nbsp;</td><td>New vertical scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#af14b17e4f5a73d2b1457707734643550" title="Scale the object.">Scale</a>, <a class="el" href="classsf_1_1Drawable.htm#a4b151b01bde5056dcb225a0ceb1dc56b" title="Set the X scale factor of the object.">SetScaleX</a>, <a class="el" href="classsf_1_1Drawable.htm#ae030c576aabe7c0cbe5ca1d6f412b906" title="Set the Y scale factor of the object.">SetScaleY</a>, <a class="el" href="classsf_1_1Drawable.htm#a6ddb66a4509565b05bf30ec1609c2a55" title="Get the current scale of the object.">GetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4b151b01bde5056dcb225a0ceb1dc56b"></a><!-- doxytag: member="sf::Sprite::SetScaleX" ref="a4b151b01bde5056dcb225a0ceb1dc56b" args="(float factor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetScaleX </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factor</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the X scale factor of the object. </p>
<p><em>factor</em> must be strictly positive, otherwise it is ignored.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factor</em>&nbsp;</td><td>New horizontal scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ae030c576aabe7c0cbe5ca1d6f412b906" title="Set the Y scale factor of the object.">SetScaleY</a>, <a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576" title="Set the scale factors of the object.">SetScale</a>, <a class="el" href="classsf_1_1Drawable.htm#a6ddb66a4509565b05bf30ec1609c2a55" title="Get the current scale of the object.">GetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae030c576aabe7c0cbe5ca1d6f412b906"></a><!-- doxytag: member="sf::Sprite::SetScaleY" ref="ae030c576aabe7c0cbe5ca1d6f412b906" args="(float factor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetScaleY </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>factor</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the Y scale factor of the object. </p>
<p><em>factor</em> must be strictly positive, otherwise it is ignored.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>factor</em>&nbsp;</td><td>New vertical scale factor</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a4b151b01bde5056dcb225a0ceb1dc56b" title="Set the X scale factor of the object.">SetScaleX</a>, <a class="el" href="classsf_1_1Drawable.htm#a0ca6c6cd466339f439f0439e1a61f576" title="Set the scale factors of the object.">SetScale</a>, <a class="el" href="classsf_1_1Drawable.htm#a6ddb66a4509565b05bf30ec1609c2a55" title="Get the current scale of the object.">GetScale</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aae8e8be077534c0b8704e59b0ea4cf9a"></a><!-- doxytag: member="sf::Sprite::SetSubRect" ref="aae8e8be077534c0b8704e59b0ea4cf9a" args="(const IntRect &amp;rectangle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::SetSubRect </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Rect.htm">IntRect</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rectangle</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the part of the texture that the sprite will display. </p>
<p>The sub-rectangle is useful when you don't want to display the whole texture, but rather a part of it. By default, the sub-rectangle covers the entire texture.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rectangle</em>&nbsp;</td><td>Rectangle defining the region of the texture to display</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#ad29401fa4c1507ceee3456f32ecc6d5e" title="Get the region of the texture displayed by the sprite.">GetSubRect</a>, <a class="el" href="classsf_1_1Sprite.htm#ae5ef49eea88de40b970460ecfc1782c4" title="Change the source texture of the sprite.">SetTexture</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae5ef49eea88de40b970460ecfc1782c4"></a><!-- doxytag: member="sf::Sprite::SetTexture" ref="ae5ef49eea88de40b970460ecfc1782c4" args="(const Texture &amp;texture, bool adjustToNewSize=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Sprite::SetTexture </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Texture.htm">Texture</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>texture</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>adjustToNewSize</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Change the source texture of the sprite. </p>
<p>The <em>texture</em> argument refers to a texture that must exist as long as the sprite uses it. Indeed, the sprite doesn't store its own copy of the texture, but rather keeps a pointer to the one that you passed to this function. If the source texture is destroyed and the sprite tries to use it, it may appear as a white rectangle. If <em>adjustToNewSize</em> is true, the SubRect property of the sprite is adjusted to the size of the new texture. If it is false, the SubRect is unchanged.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>texture</em>&nbsp;</td><td>New texture </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>adjustToNewSize</em>&nbsp;</td><td>Should the sub-rect be adjusted to the size of the new texture?</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Sprite.htm#a570dceb9617da02d3a26128bff4746cc" title="Get the source texture of the sprite.">GetTexture</a>, <a class="el" href="classsf_1_1Sprite.htm#aae8e8be077534c0b8704e59b0ea4cf9a" title="Set the part of the texture that the sprite will display.">SetSubRect</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aadf7f9963121f105fbfd01ef1854274d"></a><!-- doxytag: member="sf::Sprite::SetX" ref="aadf7f9963121f105fbfd01ef1854274d" args="(float x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetX </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>x</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the X position of the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>New X coordinate</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a2c3820004d0b70acd1a43163ceb89108" title="Set the Y position of the object.">SetY</a>, <a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a>, <a class="el" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0" title="Get the position of the object.">GetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a2c3820004d0b70acd1a43163ceb89108"></a><!-- doxytag: member="sf::Sprite::SetY" ref="a2c3820004d0b70acd1a43163ceb89108" args="(float y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sf::Drawable::SetY </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>y</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the Y position of the object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>New Y coordinate</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#aadf7f9963121f105fbfd01ef1854274d" title="Set the X position of the object.">SetX</a>, <a class="el" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a>, <a class="el" href="classsf_1_1Drawable.htm#a5961d78ed4b550092c90de500cc04fe0" title="Get the position of the object.">GetPosition</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac48af98be80280ceea40b76777a9f599"></a><!-- doxytag: member="sf::Sprite::TransformToGlobal" ref="ac48af98be80280ceea40b76777a9f599" args="(const Vector2f &amp;point) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> sf::Drawable::TransformToGlobal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>point</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Transform a local point in global coordinates. </p>
<p>This function takes a point in local coordinates, and transforms it in global coordinates. In other words, it applies the same transformations that are applied to the object (origin, translation, rotation and scale).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>Point to transform</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The transformed point</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#a0db0514c07c903009b8b5c26884a9a51" title="Transform a point in object local coordinates.">TransformToLocal</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0db0514c07c903009b8b5c26884a9a51"></a><!-- doxytag: member="sf::Sprite::TransformToLocal" ref="a0db0514c07c903009b8b5c26884a9a51" args="(const Vector2f &amp;point) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> sf::Drawable::TransformToLocal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsf_1_1Vector2.htm">Vector2f</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>point</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inherited]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Transform a point in object local coordinates. </p>
<p>This function takes a point in global coordinates, and transforms it in coordinates local to the object. In other words, it applies the inverse of all the transformations applied to the object (origin, translation, rotation and scale).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>Point to transform</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The transformed point</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Drawable.htm#ac48af98be80280ceea40b76777a9f599" title="Transform a local point in global coordinates.">TransformToGlobal</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Sprite_8hpp_source.htm">Sprite.hpp</a></li>
</ul>
</div>

        <p id="footer">
            &nbsp;::&nbsp; Copyright &copy; 2007-2008 Laurent Gomila, all rights reserved &nbsp;::&nbsp;
            Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> &nbsp;::&nbsp;
        </p>

    </body>
</html>