Sophie

Sophie

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

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_1Drawable.htm">Drawable</a>
  </div>
</div>
<div class="contents">
<h1>sf::Drawable Class Reference<br/>
<small>
[<a class="el" href="group__graphics.htm">Graphics module</a>]</small>
</h1><!-- doxytag: class="sf::Drawable" -->
<p>Abstract base class for objects that can be drawn to a render target.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Drawable_8hpp_source.htm">Drawable.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::Drawable:</div>
<div class="dynsection">
 <div class="center">
  <img src="classsf_1_1Drawable.png" usemap="#sf::Drawable_map" alt=""/>
  <map id="sf::Drawable_map" name="sf::Drawable_map">
<area href="classsf_1_1Shape.htm" alt="sf::Shape" shape="rect" coords="0,56,82,80"/>
<area href="classsf_1_1Sprite.htm" alt="sf::Sprite" shape="rect" coords="92,56,174,80"/>
<area href="classsf_1_1Text.htm" alt="sf::Text" shape="rect" coords="184,56,266,80"/>
</map>
 </div>
</div>

<p><a href="classsf_1_1Drawable-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">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a906002f2df7beb5edbddf5bbef96f120">~Drawable</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual destructor.  <a href="#a906002f2df7beb5edbddf5bbef96f120"></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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Drawable.htm#a3207642aaa8e79b8d50dae0096955ac6">Drawable</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#a3207642aaa8e79b8d50dae0096955ac6"></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>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5afc6f82b7b587ed5ada4d227ce32aa"></a><!-- doxytag: member="sf::Drawable::RenderTarget" ref="aa5afc6f82b7b587ed5ada4d227ce32aa" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>RenderTarget</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Abstract base class for objects that can be drawn to a render target. </p>
<p><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> defines the attributes and operations that are common to all the drawable classes:</p>
<ul>
<li>transformations (position, rotation, scale, local origin) </li>
<li>global overlay color </li>
<li>blending mode with background pixels </li>
<li>the ability to be drawn on a <a class="el" href="classsf_1_1RenderTarget.htm" title="Base class for all render targets (window, texture, .">sf::RenderTarget</a> (either <a class="el" href="classsf_1_1RenderWindow.htm" title="Window that can serve as a target for 2D drawing.">RenderWindow</a> or <a class="el" href="classsf_1_1RenderTexture.htm" title="Target for off-screen 2D rendering into an texture.">RenderTexture</a>)</li>
</ul>
<p>Please note that all these attributes are hardware accelerated, therefore they are extremely cheap to use (unlike older libraries that perform slow transformations on the CPU, such as rotation or scale).</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// Here we&#39;ll use a sf::Sprite to demonstrate the features of sf::Drawable</span>
 <a class="code" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> drawable = <span class="comment">/* ...whatever... */</span>;

 drawable.<a class="code" href="classsf_1_1Drawable.htm#affb3db405124b442b8f6e688f074dee0" title="Set the local origin of the object.">SetOrigin</a>(10, 20);               <span class="comment">// set its origin to the local point (10, 20)</span>
 drawable.<a class="code" href="classsf_1_1Drawable.htm#a84c8c18f14c8985f4d219298dfa16fe2" title="Set the position of the object.">SetPosition</a>(100, 100);           <span class="comment">// set its position to (100, 100)</span>
 drawable.<a class="code" href="classsf_1_1Drawable.htm#a32b161223f46faa281428082d4435223" title="Set the orientation of the object.">SetRotation</a>(45);                 <span class="comment">// set its orientation to 45 degrees</span>
 drawable.<a class="code" href="classsf_1_1Drawable.htm#a43246dac44655361c14407bdfd03c943" title="Set the global color of the object.">SetColor</a>(<a class="code" href="classsf_1_1Color.htm#a127dbf55db9c07d0fa8f4bfcbb97594a" title="Red predefined color.">sf::Color::Red</a>);        <span class="comment">// set its global color to red</span>
 drawable.SetBlendingMode(<a class="code" href="group__graphics.htm#gga1a2fa89de4bb0d82b2eb30399fe575caad40133cc93b5ee0975eb4c2266815563" title="Pixel = Src + Dest.">sf::Blend::Add</a>); <span class="comment">// set an additive blend mode</span>

 window.Draw(drawable); <span class="comment">// finally draw it (window is a sf::RenderWindow)</span>
</pre></div><p>Deriving your own class 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> is possible, however you have to use the <a class="el" href="classsf_1_1Renderer.htm" title="Handles the low-level rendering (states and geometry).">sf::Renderer</a> class instead of direct OpenGL calls, which is more limited. To create a derived drawable class, all you have to do is to override the virtual Render function.</p>
<p>One of the main benefits of creating your own drawable class is that you can build hierarchies of drawable objects. Indeed, when you draw a drawable inside the Render function of another drawable, the former inherits the transformations and color of the latter and combines them with its own attributes. This way, you can apply global transformations/color to a set of drawables as if it was a single entity.</p>
<p>Example: </p>
<div class="fragment"><pre class="fragment"> <span class="keyword">class </span>MyDrawable : <span class="keyword">public</span> sf::<a class="code" href="classsf_1_1Drawable.htm#a3207642aaa8e79b8d50dae0096955ac6" title="Default constructor.">Drawable</a>
 {
 <span class="keyword">public</span> :

    ...

 <span class="keyword">private</span> :

     <span class="keyword">virtual</span> <span class="keywordtype">void</span> Render(<a class="code" href="classsf_1_1RenderTarget.htm" title="Base class for all render targets (window, texture, .">sf::RenderTarget</a>&amp; target, <a class="code" href="classsf_1_1Renderer.htm" title="Handles the low-level rendering (states and geometry).">sf::Renderer</a>&amp; renderer)<span class="keyword"> const</span>
<span class="keyword">     </span>{
         <span class="comment">// Low-level geometry rendering</span>
         renderer.<a class="code" href="classsf_1_1Renderer.htm#aaa78b53c0879e1307012efd1f552a606" title="Set the current texture.">SetTexture</a>(&amp;myTexture);
         renderer.<a class="code" href="classsf_1_1Renderer.htm#ab2b04c012cb46563d0f837f82c6190da" title="Begin rendering a new geometry batch.">Begin</a>(<a class="code" href="classsf_1_1Renderer.htm#aebe601741d69512186e194043bc7b87da0e6909aa182e43bfa662d9ba99f6ab39" title="Simple list of quads.">sf::Renderer::QuadList</a>);
             renderer.<a class="code" href="classsf_1_1Renderer.htm#a65896ee96f04da98ac0f599ae670168f" title="Add a new vertex (position only).">AddVertex</a>(...);
             renderer.<a class="code" href="classsf_1_1Renderer.htm#a65896ee96f04da98ac0f599ae670168f" title="Add a new vertex (position only).">AddVertex</a>(...);
             renderer.<a class="code" href="classsf_1_1Renderer.htm#a65896ee96f04da98ac0f599ae670168f" title="Add a new vertex (position only).">AddVertex</a>(...);
             renderer.<a class="code" href="classsf_1_1Renderer.htm#a65896ee96f04da98ac0f599ae670168f" title="Add a new vertex (position only).">AddVertex</a>(...);
         renderer.<a class="code" href="classsf_1_1Renderer.htm#a7975513c9cebfd0ce955826bc7967ccf" title="End the current geometry batch and render it.">End</a>();

         <span class="comment">// High-level drawable rendering</span>
         target.<a class="code" href="classsf_1_1RenderTarget.htm#a2738f2d02c722971aa8e367264c4a046" title="Draw an object into the target.">Draw</a>(mySubSprite);
     }

     <a class="code" href="classsf_1_1Texture.htm" title="Image living on the graphics card that can be used for drawing.">sf::Texture</a> myTexture;
     <a class="code" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a> mySubSprite;
 };
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classsf_1_1Shape.htm" title="A convex, colored polygon with an optional outline.">sf::Shape</a>, <a class="el" href="classsf_1_1Sprite.htm" title="Drawable representation of a texture, with its own transformations, color, blend...">sf::Sprite</a>, <a class="el" href="classsf_1_1Text.htm" title="Graphical text that can be drawn to a render target.">sf::Text</a> </dd></dl>

<p>Definition at line <a class="el" href="Drawable_8hpp_source.htm#l00062">62</a> of file <a class="el" href="Drawable_8hpp_source.htm">Drawable.hpp</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a906002f2df7beb5edbddf5bbef96f120"></a><!-- doxytag: member="sf::Drawable::~Drawable" ref="a906002f2df7beb5edbddf5bbef96f120" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual sf::Drawable::~Drawable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual destructor. </p>

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

<p>Default constructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab6446c4717a2800cad85db55cb55409a"></a><!-- doxytag: member="sf::Drawable::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</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::Drawable::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</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::Drawable::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]</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::Drawable::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]</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::Drawable::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</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::Drawable::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</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::Drawable::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</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::Drawable::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</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="a968666b142af3219622b5011b6cdd96a"></a><!-- doxytag: member="sf::Drawable::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></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::Drawable::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></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="a9e2d796314a871dfc19597c68084cf4c"></a><!-- doxytag: member="sf::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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::Drawable::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></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="aadf7f9963121f105fbfd01ef1854274d"></a><!-- doxytag: member="sf::Drawable::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></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::Drawable::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></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::Drawable::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</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::Drawable::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</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="Drawable_8hpp_source.htm">Drawable.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>