diff options
Diffstat (limited to 'doc/html/Shape_8hpp-source.htm')
-rwxr-xr-x | doc/html/Shape_8hpp-source.htm | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/doc/html/Shape_8hpp-source.htm b/doc/html/Shape_8hpp-source.htm deleted file mode 100755 index f45d290..0000000 --- a/doc/html/Shape_8hpp-source.htm +++ /dev/null @@ -1,148 +0,0 @@ -<!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.5.8 --> -<div class="navigation" id="top"> - <div class="tabs"> - <ul> - <li><a href="index.htm"><span>Main Page</span></a></li> - <li><a href="namespaces.htm"><span>Namespaces</span></a></li> - <li><a href="annotated.htm"><span>Classes</span></a></li> - <li class="current"><a href="files.htm"><span>Files</span></a></li> - </ul> - </div> - <div class="tabs"> - <ul> - <li><a href="files.htm"><span>File List</span></a></li> - </ul> - </div> -<h1>Shape.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 -<a name="l00002"></a>00002 <span class="comment">//</span> -<a name="l00003"></a>00003 <span class="comment">// SFML - Simple and Fast Multimedia Library</span> -<a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)</span> -<a name="l00005"></a>00005 <span class="comment">//</span> -<a name="l00006"></a>00006 <span class="comment">// This software is provided 'as-is', without any express or implied warranty.</span> -<a name="l00007"></a>00007 <span class="comment">// In no event will the authors be held liable for any damages arising from the use of this software.</span> -<a name="l00008"></a>00008 <span class="comment">//</span> -<a name="l00009"></a>00009 <span class="comment">// Permission is granted to anyone to use this software for any purpose,</span> -<a name="l00010"></a>00010 <span class="comment">// including commercial applications, and to alter it and redistribute it freely,</span> -<a name="l00011"></a>00011 <span class="comment">// subject to the following restrictions:</span> -<a name="l00012"></a>00012 <span class="comment">//</span> -<a name="l00013"></a>00013 <span class="comment">// 1. The origin of this software must not be misrepresented;</span> -<a name="l00014"></a>00014 <span class="comment">// you must not claim that you wrote the original software.</span> -<a name="l00015"></a>00015 <span class="comment">// If you use this software in a product, an acknowledgment</span> -<a name="l00016"></a>00016 <span class="comment">// in the product documentation would be appreciated but is not required.</span> -<a name="l00017"></a>00017 <span class="comment">//</span> -<a name="l00018"></a>00018 <span class="comment">// 2. Altered source versions must be plainly marked as such,</span> -<a name="l00019"></a>00019 <span class="comment">// and must not be misrepresented as being the original software.</span> -<a name="l00020"></a>00020 <span class="comment">//</span> -<a name="l00021"></a>00021 <span class="comment">// 3. This notice may not be removed or altered from any source distribution.</span> -<a name="l00022"></a>00022 <span class="comment">//</span> -<a name="l00024"></a>00024 <span class="comment"></span> -<a name="l00025"></a>00025 <span class="preprocessor">#ifndef SFML_SHAPE_HPP</span> -<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define SFML_SHAPE_HPP</span> -<a name="l00027"></a>00027 <span class="preprocessor"></span> -<a name="l00029"></a>00029 <span class="comment">// Headers</span> -<a name="l00031"></a>00031 <span class="comment"></span><span class="preprocessor">#include <SFML/Graphics/Drawable.hpp></span> -<a name="l00032"></a>00032 <span class="preprocessor">#include <SFML/System/Vector2.hpp></span> -<a name="l00033"></a>00033 <span class="preprocessor">#include <vector></span> -<a name="l00034"></a>00034 -<a name="l00035"></a>00035 -<a name="l00036"></a>00036 <span class="keyword">namespace </span>sf -<a name="l00037"></a>00037 { -<a name="l00043"></a><a class="code" href="classsf_1_1Shape.htm">00043</a> <span class="keyword">class </span>SFML_API <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> : <span class="keyword">public</span> sf::<a class="code" href="classsf_1_1Drawable.htm" title="Abstract base class for every object that can be drawn into a render window.">Drawable</a> -<a name="l00044"></a>00044 { -<a name="l00045"></a>00045 <span class="keyword">public</span> : -<a name="l00046"></a>00046 -<a name="l00051"></a>00051 <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a>(); -<a name="l00052"></a>00052 -<a name="l00061"></a>00061 <span class="keywordtype">void</span> AddPoint(<span class="keywordtype">float</span> X, <span class="keywordtype">float</span> Y, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(255, 255, 255), <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(0, 0, 0)); -<a name="l00062"></a>00062 -<a name="l00071"></a>00071 <span class="keywordtype">void</span> AddPoint(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& Position, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(255, 255, 255), <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(0, 0, 0)); -<a name="l00072"></a>00072 -<a name="l00079"></a>00079 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetNbPoints() <span class="keyword">const</span>; -<a name="l00080"></a>00080 -<a name="l00088"></a>00088 <span class="keywordtype">void</span> EnableFill(<span class="keywordtype">bool</span> Enable); -<a name="l00089"></a>00089 -<a name="l00097"></a>00097 <span class="keywordtype">void</span> EnableOutline(<span class="keywordtype">bool</span> Enable); -<a name="l00098"></a>00098 -<a name="l00106"></a>00106 <span class="keywordtype">void</span> SetPointPosition(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index, <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& Position); -<a name="l00107"></a>00107 -<a name="l00116"></a>00116 <span class="keywordtype">void</span> SetPointPosition(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index, <span class="keywordtype">float</span> X, <span class="keywordtype">float</span> Y); -<a name="l00117"></a>00117 -<a name="l00125"></a>00125 <span class="keywordtype">void</span> SetPointColor(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col); -<a name="l00126"></a>00126 -<a name="l00134"></a>00134 <span class="keywordtype">void</span> SetPointOutlineColor(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol); -<a name="l00135"></a>00135 -<a name="l00142"></a>00142 <span class="keywordtype">void</span> SetOutlineWidth(<span class="keywordtype">float</span> Width); -<a name="l00143"></a>00143 -<a name="l00152"></a>00152 <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& GetPointPosition(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index) <span class="keyword">const</span>; -<a name="l00153"></a>00153 -<a name="l00162"></a>00162 <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& GetPointColor(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index) <span class="keyword">const</span>; -<a name="l00163"></a>00163 -<a name="l00172"></a>00172 <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& GetPointOutlineColor(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Index) <span class="keyword">const</span>; -<a name="l00173"></a>00173 -<a name="l00180"></a>00180 <span class="keywordtype">float</span> GetOutlineWidth() <span class="keyword">const</span>; -<a name="l00181"></a>00181 -<a name="l00193"></a>00193 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Line(<span class="keywordtype">float</span> P1X, <span class="keywordtype">float</span> P1Y, <span class="keywordtype">float</span> P2X, <span class="keywordtype">float</span> P2Y, <span class="keywordtype">float</span> Thickness, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00194"></a>00194 -<a name="l00206"></a>00206 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Line(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P1, <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P2, <span class="keywordtype">float</span> Thickness, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00207"></a>00207 -<a name="l00218"></a>00218 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Rectangle(<span class="keywordtype">float</span> P1X, <span class="keywordtype">float</span> P1Y, <span class="keywordtype">float</span> P2X, <span class="keywordtype">float</span> P2Y, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00219"></a>00219 -<a name="l00230"></a>00230 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Rectangle(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P1, <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P2, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00231"></a>00231 -<a name="l00242"></a>00242 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Circle(<span class="keywordtype">float</span> X, <span class="keywordtype">float</span> Y, <span class="keywordtype">float</span> Radius, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00243"></a>00243 -<a name="l00254"></a>00254 <span class="keyword">static</span> <a class="code" href="classsf_1_1Shape.htm" title="Shape defines a drawable convex shape ; it also defines helper functions to draw...">Shape</a> Circle(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& Center, <span class="keywordtype">float</span> Radius, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& Col, <span class="keywordtype">float</span> Outline = 0.f, <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineCol = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">sf::Color</a>(0, 0, 0)); -<a name="l00255"></a>00255 -<a name="l00256"></a>00256 <span class="keyword">protected</span> : -<a name="l00257"></a>00257 -<a name="l00262"></a>00262 <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, image, .">RenderTarget</a>& Target) <span class="keyword">const</span>; -<a name="l00263"></a>00263 -<a name="l00264"></a>00264 <span class="keyword">private</span> : -<a name="l00265"></a>00265 -<a name="l00270"></a>00270 <span class="keywordtype">void</span> Compile(); -<a name="l00271"></a>00271 -<a name="l00282"></a>00282 <span class="keyword">static</span> <span class="keywordtype">bool</span> ComputeNormal(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P1, <span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& P2, <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& Normal); -<a name="l00283"></a>00283 -<a name="l00287"></a>00287 <span class="keyword">struct </span>Point -<a name="l00288"></a>00288 { -<a name="l00289"></a>00289 Point(<span class="keyword">const</span> <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>& Pos = <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a>(0, 0), <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& C = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(255, 255, 255), <span class="keyword">const</span> <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>& OutlineC = <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a>(255, 255, 255)); -<a name="l00290"></a>00290 -<a name="l00291"></a>00291 <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a> Position; -<a name="l00292"></a>00292 <a class="code" href="classsf_1_1Vector2.htm">Vector2f</a> Normal; -<a name="l00293"></a>00293 <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a> Col; -<a name="l00294"></a>00294 <a class="code" href="classsf_1_1Color.htm" title="Color is an utility class for manipulating 32-bits RGBA colors.">Color</a> OutlineCol; -<a name="l00295"></a>00295 }; -<a name="l00296"></a>00296 -<a name="l00298"></a>00298 <span class="comment">// Member data</span> -<a name="l00300"></a>00300 <span class="comment"></span> std::vector<Point> myPoints; -<a name="l00301"></a>00301 <span class="keywordtype">float</span> myOutline; -<a name="l00302"></a>00302 <span class="keywordtype">bool</span> myIsFillEnabled; -<a name="l00303"></a>00303 <span class="keywordtype">bool</span> myIsOutlineEnabled; -<a name="l00304"></a>00304 <span class="keywordtype">bool</span> myIsCompiled; -<a name="l00305"></a>00305 }; -<a name="l00306"></a>00306 -<a name="l00307"></a>00307 } <span class="comment">// namespace sf</span> -<a name="l00308"></a>00308 -<a name="l00309"></a>00309 -<a name="l00310"></a>00310 <span class="preprocessor">#endif // SFML_SHAPE_HPP</span> -</pre></div></div> - - <p id="footer"> - :: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: - Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.5.2</a> :: - </p> - - </body> -</html> |