started woking on figuring out doxygen documentation and added readme
This commit is contained in:
parent
c598f3e106
commit
3f0556341c
1192 changed files with 199462 additions and 29 deletions
259
doc/doxygen/html/d9/d7b/packages_2graphics_2sdl_2obround_8c.html
Normal file
259
doc/doxygen/html/d9/d7b/packages_2graphics_2sdl_2obround_8c.html
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
<!-- HTML header for doxygen 1.9.2-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Archeus: /home/herbglitch/programs/archeus/arc/packages/graphics/sdl/obround.c File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../doxygen-awesome-darkmode-toggle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Archeus<span id="projectnumber"> 0.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">A C library and game engine that focuses on documentation</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d9/d7b/packages_2graphics_2sdl_2obround_8c.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">obround.c File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="../../d2/dba/graphics_2obround_8h_source.html">arc/graphics/obround.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="../../d1/d2f/packages_2graphics_2sdl_2renderer_8h_source.html">renderer.h</a>"</code><br />
|
||||
<code>#include <stdlib.h></code><br />
|
||||
</div>
|
||||
<p><a href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ab86dda25da47d441b5ce38b8d8311b5a" id="r_ab86dda25da47d441b5ce38b8d8311b5a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a> (<a class="el" href="../../d4/d06/structARC__Obround.html">ARC_Obround</a> *obround, <a class="el" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *renderer, <a class="el" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *color)</td></tr>
|
||||
<tr class="separator:ab86dda25da47d441b5ce38b8d8311b5a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a98eddca08e5473a0860716a4e0b238f4" id="r_a98eddca08e5473a0860716a4e0b238f4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a98eddca08e5473a0860716a4e0b238f4">ARC_FObround_Render</a> (<a class="el" href="../../dc/d00/structARC__FObround.html">ARC_FObround</a> *obround, <a class="el" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *renderer, <a class="el" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *color)</td></tr>
|
||||
<tr class="separator:a98eddca08e5473a0860716a4e0b238f4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a98eddca08e5473a0860716a4e0b238f4" name="a98eddca08e5473a0860716a4e0b238f4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a98eddca08e5473a0860716a4e0b238f4">◆ </a></span>ARC_FObround_Render()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void ARC_FObround_Render </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../dc/d00/structARC__FObround.html">ARC_FObround</a> *</td> <td class="paramname"><span class="paramname"><em>obround</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *</td> <td class="paramname"><span class="paramname"><em>renderer</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *</td> <td class="paramname"><span class="paramname"><em>color</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html#l00045">45</a> of file <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html">obround.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 45</span> {</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <a class="code hl_struct" href="../../d4/d06/structARC__Obround.html">ARC_Obround</a> casted = <a class="code hl_function" href="../../d3/d66/math_2obround_8h.html#acc0ba97a943dba9998a65156da2a8e7f">ARC_FObround_CastToObround</a>(obround);</div>
|
||||
<div class="line"><span class="lineno"> 47</span> <a class="code hl_function" href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a>(&casted, renderer, color);</div>
|
||||
<div class="line"><span class="lineno"> 48</span>}</div>
|
||||
<div class="ttc" id="agraphics_2obround_8h_html_ab86dda25da47d441b5ce38b8d8311b5a"><div class="ttname"><a href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a></div><div class="ttdeci">void ARC_Obround_Render(ARC_Obround *obround, ARC_Renderer *renderer, ARC_Color *color)</div><div class="ttdef"><b>Definition</b> <a href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html#l00006">obround.c:6</a></div></div>
|
||||
<div class="ttc" id="amath_2obround_8h_html_acc0ba97a943dba9998a65156da2a8e7f"><div class="ttname"><a href="../../d3/d66/math_2obround_8h.html#acc0ba97a943dba9998a65156da2a8e7f">ARC_FObround_CastToObround</a></div><div class="ttdeci">ARC_Obround ARC_FObround_CastToObround(ARC_FObround *obround)</div><div class="ttdoc">casts FObround to Obround</div><div class="ttdef"><b>Definition</b> <a href="../../d5/df6/src_2math_2obround_8c_source.html#l00012">obround.c:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html">ARC_Obround</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00010">obround.h:10</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../d5/df6/src_2math_2obround_8c_source.html#l00012">ARC_FObround_CastToObround()</a>, and <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html#l00006">ARC_Obround_Render()</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab86dda25da47d441b5ce38b8d8311b5a" name="ab86dda25da47d441b5ce38b8d8311b5a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab86dda25da47d441b5ce38b8d8311b5a">◆ </a></span>ARC_Obround_Render()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void ARC_Obround_Render </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="../../d4/d06/structARC__Obround.html">ARC_Obround</a> *</td> <td class="paramname"><span class="paramname"><em>obround</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *</td> <td class="paramname"><span class="paramname"><em>renderer</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *</td> <td class="paramname"><span class="paramname"><em>color</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html#l00006">6</a> of file <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html">obround.c</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 6</span> {</div>
|
||||
<div class="line"><span class="lineno"> 7</span> SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a6c4055eeb76cc41f69647e9f1a6e0809">r</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a99f9ff927c0b0ebc374dee25b692a2d7">g</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a874909255d3dc7419fa4bf4a74639c7e">b</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a2fa102f4314c8c10cefc4efa242ed234">a</a>);</div>
|
||||
<div class="line"><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><span class="lineno"> 9</span> int32_t diameter = (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a> * 2);</div>
|
||||
<div class="line"><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><span class="lineno"> 11</span> int32_t x = (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a> - 1);</div>
|
||||
<div class="line"><span class="lineno"> 12</span> int32_t y = 0;</div>
|
||||
<div class="line"><span class="lineno"> 13</span> int32_t tx = 1;</div>
|
||||
<div class="line"><span class="lineno"> 14</span> int32_t ty = 1;</div>
|
||||
<div class="line"><span class="lineno"> 15</span> int32_t error = (tx - diameter);</div>
|
||||
<div class="line"><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><span class="lineno"> 17</span> SDL_RenderDrawLine((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2), obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 18</span> SDL_RenderDrawLine((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2), obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><span class="lineno"> 20</span> <span class="keywordflow">while</span>(x >= y){</div>
|
||||
<div class="line"><span class="lineno"> 21</span> <span class="comment">// Each of the following renders an octant of the circle</span></div>
|
||||
<div class="line"><span class="lineno"> 22</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - y - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 23</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + y + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 24</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - y - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 25</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + y + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 26</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - x - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 27</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + x + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 28</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - x - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 29</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + x + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><span class="lineno"> 31</span> <span class="keywordflow">if</span>(error <= 0){</div>
|
||||
<div class="line"><span class="lineno"> 32</span> ++y;</div>
|
||||
<div class="line"><span class="lineno"> 33</span> error += ty;</div>
|
||||
<div class="line"><span class="lineno"> 34</span> ty += 2;</div>
|
||||
<div class="line"><span class="lineno"> 35</span> }</div>
|
||||
<div class="line"><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">if</span>(error > 0){</div>
|
||||
<div class="line"><span class="lineno"> 38</span> --x;</div>
|
||||
<div class="line"><span class="lineno"> 39</span> tx += 2;</div>
|
||||
<div class="line"><span class="lineno"> 40</span> error += (tx - diameter);</div>
|
||||
<div class="line"><span class="lineno"> 41</span> }</div>
|
||||
<div class="line"><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><span class="lineno"> 43</span>}</div>
|
||||
<div class="ttc" id="astructARC__Color_html_a2fa102f4314c8c10cefc4efa242ed234"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a2fa102f4314c8c10cefc4efa242ed234">ARC_Color::a</a></div><div class="ttdeci">uint8_t a</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a6c4055eeb76cc41f69647e9f1a6e0809"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a6c4055eeb76cc41f69647e9f1a6e0809">ARC_Color::r</a></div><div class="ttdeci">uint8_t r</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a874909255d3dc7419fa4bf4a74639c7e"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a874909255d3dc7419fa4bf4a74639c7e">ARC_Color::b</a></div><div class="ttdeci">uint8_t b</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a99f9ff927c0b0ebc374dee25b692a2d7"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a99f9ff927c0b0ebc374dee25b692a2d7">ARC_Color::g</a></div><div class="ttdeci">uint8_t g</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_a3d884224975dfd2fc8fbd5a4cdaedea6"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">ARC_Obround::r</a></div><div class="ttdeci">int32_t r</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00013">obround.h:13</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aa76f24b7b9ed595509ce86e814ce2e5c"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">ARC_Obround::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00011">obround.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aaf9160914e7d76682f8507afed6679de"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">ARC_Obround::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00012">obround.h:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aed164dae5e8ad2ba41f06b97375aa368"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">ARC_Obround::h</a></div><div class="ttdeci">int32_t h</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00014">obround.h:14</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
<p class="reference">References <a class="el" href="../../da/dec/color_8h_source.html#l00011">ARC_Color::a</a>, <a class="el" href="../../da/dec/color_8h_source.html#l00011">ARC_Color::b</a>, <a class="el" href="../../da/dec/color_8h_source.html#l00011">ARC_Color::g</a>, <a class="el" href="../../d3/d66/math_2obround_8h_source.html#l00014">ARC_Obround::h</a>, <a class="el" href="../../da/dec/color_8h_source.html#l00011">ARC_Color::r</a>, <a class="el" href="../../d3/d66/math_2obround_8h_source.html#l00013">ARC_Obround::r</a>, <a class="el" href="../../d3/d66/math_2obround_8h_source.html#l00011">ARC_Obround::x</a>, and <a class="el" href="../../d3/d66/math_2obround_8h_source.html#l00012">ARC_Obround::y</a>.</p>
|
||||
|
||||
<p class="reference">Referenced by <a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html#l00045">ARC_FObround_Render()</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- HTML footer for doxygen 1.9.2-->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul><li class="navelem"><a class="el" href="../../dir_93501a11e921083efbd154e0cdff5f10.html">packages</a></li><li class="navelem"><a class="el" href="../../dir_af6e6c3357835c7f766dfcaf351d30ad.html">graphics</a></li><li class="navelem"><a class="el" href="../../dir_384bcd99d3b936f9e95fe1cb5def6f01.html">sdl</a></li><li class="navelem"><a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c.html">obround.c</a></li></ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// script for doxygen 1.9.1
|
||||
$(function() {
|
||||
toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = "Toggle Light/Dark Mode"
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
var packages_2graphics_2sdl_2obround_8c =
|
||||
[
|
||||
[ "ARC_FObround_Render", "d9/d7b/packages_2graphics_2sdl_2obround_8c.html#a98eddca08e5473a0860716a4e0b238f4", null ],
|
||||
[ "ARC_Obround_Render", "d9/d7b/packages_2graphics_2sdl_2obround_8c.html#ab86dda25da47d441b5ce38b8d8311b5a", null ]
|
||||
];
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<!-- HTML header for doxygen 1.9.2-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Archeus: /home/herbglitch/programs/archeus/arc/packages/graphics/sdl/obround.c Source File</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../jquery.js"></script>
|
||||
<script type="text/javascript" src="../../dynsections.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="../../doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../doxygen-awesome-darkmode-toggle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Archeus<span id="projectnumber"> 0.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">A C library and game engine that focuses on documentation</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('d9/d7b/packages_2graphics_2sdl_2obround_8c_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">obround.c</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "<a class="code" href="../../d2/dba/graphics_2obround_8h.html">arc/graphics/obround.h</a>"</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="../../d1/d2f/packages_2graphics_2sdl_2renderer_8h.html">renderer.h</a>"</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include <stdlib.h></span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">//Modified from https://stackoverflow.com/questions/38334081/how-to-draw-circles-arcs-and-vector-graphics-in-sdl</span></div>
|
||||
<div class="foldopen" id="foldopen00006" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a"> 6</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a>(<a class="code hl_struct" href="../../d4/d06/structARC__Obround.html">ARC_Obround</a> *obround, <a class="code hl_typedef" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *renderer, <a class="code hl_struct" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *color){</div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a6c4055eeb76cc41f69647e9f1a6e0809">r</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a99f9ff927c0b0ebc374dee25b692a2d7">g</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a874909255d3dc7419fa4bf4a74639c7e">b</a>, color-><a class="code hl_variable" href="../../d2/d30/structARC__Color.html#a2fa102f4314c8c10cefc4efa242ed234">a</a>);</div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> int32_t diameter = (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a> * 2);</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> int32_t x = (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a> - 1);</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> int32_t y = 0;</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> int32_t tx = 1;</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> int32_t ty = 1;</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> int32_t error = (tx - diameter);</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> SDL_RenderDrawLine((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2), obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> SDL_RenderDrawLine((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2), obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">r</a>, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">while</span>(x >= y){</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="comment">// Each of the following renders an octant of the circle</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - y - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + y + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - y - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - x, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + y + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - x - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> + y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + x + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> - x - (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> SDL_RenderDrawPoint((SDL_Renderer *)renderer, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">x</a> - y, obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">y</a> + x + (obround-><a class="code hl_variable" href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">h</a> / 2));</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">if</span>(error <= 0){</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> ++y;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> error += ty;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> ty += 2;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">if</span>(error > 0){</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> --x;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> tx += 2;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> error += (tx - diameter);</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="foldopen" id="foldopen00045" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="../../d2/dba/graphics_2obround_8h.html#a98eddca08e5473a0860716a4e0b238f4"> 45</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d2/dba/graphics_2obround_8h.html#a98eddca08e5473a0860716a4e0b238f4">ARC_FObround_Render</a>(<a class="code hl_struct" href="../../dc/d00/structARC__FObround.html">ARC_FObround</a> *obround, <a class="code hl_typedef" href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a> *renderer, <a class="code hl_struct" href="../../d2/d30/structARC__Color.html">ARC_Color</a> *color){</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_struct" href="../../d4/d06/structARC__Obround.html">ARC_Obround</a> casted = <a class="code hl_function" href="../../d3/d66/math_2obround_8h.html#acc0ba97a943dba9998a65156da2a8e7f">ARC_FObround_CastToObround</a>(obround);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_function" href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a>(&casted, renderer, color);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="agraphics_2obround_8h_html"><div class="ttname"><a href="../../d2/dba/graphics_2obround_8h.html">obround.h</a></div></div>
|
||||
<div class="ttc" id="agraphics_2obround_8h_html_a98eddca08e5473a0860716a4e0b238f4"><div class="ttname"><a href="../../d2/dba/graphics_2obround_8h.html#a98eddca08e5473a0860716a4e0b238f4">ARC_FObround_Render</a></div><div class="ttdeci">void ARC_FObround_Render(ARC_FObround *obround, ARC_Renderer *renderer, ARC_Color *color)</div><div class="ttdef"><b>Definition</b> <a href="#l00045">obround.c:45</a></div></div>
|
||||
<div class="ttc" id="agraphics_2obround_8h_html_ab86dda25da47d441b5ce38b8d8311b5a"><div class="ttname"><a href="../../d2/dba/graphics_2obround_8h.html#ab86dda25da47d441b5ce38b8d8311b5a">ARC_Obround_Render</a></div><div class="ttdeci">void ARC_Obround_Render(ARC_Obround *obround, ARC_Renderer *renderer, ARC_Color *color)</div><div class="ttdef"><b>Definition</b> <a href="#l00006">obround.c:6</a></div></div>
|
||||
<div class="ttc" id="ainclude_2arc_2graphics_2renderer_8h_html_a2b82366dc421b3e80aace49f3ae8639a"><div class="ttname"><a href="../../d1/dc6/include_2arc_2graphics_2renderer_8h.html#a2b82366dc421b3e80aace49f3ae8639a">ARC_Renderer</a></div><div class="ttdeci">struct ARC_RendererType ARC_Renderer</div><div class="ttdef"><b>Definition</b> <a href="../../d1/dc6/include_2arc_2graphics_2renderer_8h_source.html#l00016">renderer.h:16</a></div></div>
|
||||
<div class="ttc" id="amath_2obround_8h_html_acc0ba97a943dba9998a65156da2a8e7f"><div class="ttname"><a href="../../d3/d66/math_2obround_8h.html#acc0ba97a943dba9998a65156da2a8e7f">ARC_FObround_CastToObround</a></div><div class="ttdeci">ARC_Obround ARC_FObround_CastToObround(ARC_FObround *obround)</div><div class="ttdoc">casts FObround to Obround</div><div class="ttdef"><b>Definition</b> <a href="../../d5/df6/src_2math_2obround_8c_source.html#l00012">obround.c:12</a></div></div>
|
||||
<div class="ttc" id="apackages_2graphics_2sdl_2renderer_8h_html"><div class="ttname"><a href="../../d1/d2f/packages_2graphics_2sdl_2renderer_8h.html">renderer.h</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html"><div class="ttname"><a href="../../d2/d30/structARC__Color.html">ARC_Color</a></div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00010">color.h:10</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a2fa102f4314c8c10cefc4efa242ed234"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a2fa102f4314c8c10cefc4efa242ed234">ARC_Color::a</a></div><div class="ttdeci">uint8_t a</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a6c4055eeb76cc41f69647e9f1a6e0809"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a6c4055eeb76cc41f69647e9f1a6e0809">ARC_Color::r</a></div><div class="ttdeci">uint8_t r</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a874909255d3dc7419fa4bf4a74639c7e"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a874909255d3dc7419fa4bf4a74639c7e">ARC_Color::b</a></div><div class="ttdeci">uint8_t b</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Color_html_a99f9ff927c0b0ebc374dee25b692a2d7"><div class="ttname"><a href="../../d2/d30/structARC__Color.html#a99f9ff927c0b0ebc374dee25b692a2d7">ARC_Color::g</a></div><div class="ttdeci">uint8_t g</div><div class="ttdef"><b>Definition</b> <a href="../../da/dec/color_8h_source.html#l00011">color.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__FObround_html"><div class="ttname"><a href="../../dc/d00/structARC__FObround.html">ARC_FObround</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00017">obround.h:17</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html">ARC_Obround</a></div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00010">obround.h:10</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_a3d884224975dfd2fc8fbd5a4cdaedea6"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#a3d884224975dfd2fc8fbd5a4cdaedea6">ARC_Obround::r</a></div><div class="ttdeci">int32_t r</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00013">obround.h:13</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aa76f24b7b9ed595509ce86e814ce2e5c"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aa76f24b7b9ed595509ce86e814ce2e5c">ARC_Obround::x</a></div><div class="ttdeci">int32_t x</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00011">obround.h:11</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aaf9160914e7d76682f8507afed6679de"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aaf9160914e7d76682f8507afed6679de">ARC_Obround::y</a></div><div class="ttdeci">int32_t y</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00012">obround.h:12</a></div></div>
|
||||
<div class="ttc" id="astructARC__Obround_html_aed164dae5e8ad2ba41f06b97375aa368"><div class="ttname"><a href="../../d4/d06/structARC__Obround.html#aed164dae5e8ad2ba41f06b97375aa368">ARC_Obround::h</a></div><div class="ttdeci">int32_t h</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d66/math_2obround_8h_source.html#l00014">obround.h:14</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- HTML footer for doxygen 1.9.2-->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul><li class="navelem"><a class="el" href="../../dir_93501a11e921083efbd154e0cdff5f10.html">packages</a></li><li class="navelem"><a class="el" href="../../dir_af6e6c3357835c7f766dfcaf351d30ad.html">graphics</a></li><li class="navelem"><a class="el" href="../../dir_384bcd99d3b936f9e95fe1cb5def6f01.html">sdl</a></li><li class="navelem"><a class="el" href="../../d9/d7b/packages_2graphics_2sdl_2obround_8c.html">obround.c</a></li></ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// script for doxygen 1.9.1
|
||||
$(function() {
|
||||
toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = "Toggle Light/Dark Mode"
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue