Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > cf48da7d1b8e1f83fb29b038ef4f8fc6 > files > 408

engauge-digitizer-doc-9.8-1.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Engauge Digitizer: Geometry/GeometryStrategyContext.cpp 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="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" />
</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">Engauge Digitizer
   &#160;<span id="projectnumber">2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- 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">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_eccc925508204c58f9de69585b548932.html">Geometry</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">GeometryStrategyContext.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * (C) 2016 markummitchell@github.com. This file is part of Engauge Digitizer, which is released      *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission.     *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> ******************************************************************************************************/</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;CurveConnectAs.h&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;GeometryStrategyContext.h&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;GeometryStrategyFunctionSmooth.h&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;GeometryStrategyFunctionStraight.h&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;GeometryStrategyRelationSmooth.h&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;GeometryStrategyRelationStraight.h&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;Transformation.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classGeometryStrategyContext.html#a876c3fcc3bb3273e5cf102388d1ef554">   15</a></span>&#160;<a class="code" href="classGeometryStrategyContext.html#a876c3fcc3bb3273e5cf102388d1ef554">GeometryStrategyContext::GeometryStrategyContext</a>()</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  m_strategies.insert (CONNECT_AS_FUNCTION_SMOOTH  , <span class="keyword">new</span> <a class="code" href="classGeometryStrategyFunctionSmooth.html">GeometryStrategyFunctionSmooth</a>   ());</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  m_strategies.insert (CONNECT_AS_FUNCTION_STRAIGHT, <span class="keyword">new</span> <a class="code" href="classGeometryStrategyFunctionStraight.html">GeometryStrategyFunctionStraight</a> ());</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  m_strategies.insert (CONNECT_AS_RELATION_SMOOTH  , <span class="keyword">new</span> <a class="code" href="classGeometryStrategyRelationSmooth.html">GeometryStrategyRelationSmooth</a>   ());</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  m_strategies.insert (CONNECT_AS_RELATION_STRAIGHT, <span class="keyword">new</span> <a class="code" href="classGeometryStrategyRelationStraight.html">GeometryStrategyRelationStraight</a> ());</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;}</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;GeometryStrategyContext::~GeometryStrategyContext()</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;}</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classGeometryStrategyContext.html#aac5d661910a228def8683cc85864559b">   27</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classGeometryStrategyContext.html#aac5d661910a228def8683cc85864559b">GeometryStrategyContext::calculateGeometry</a> (<span class="keyword">const</span> Points &amp;points,</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="classDocumentModelCoords.html">DocumentModelCoords</a> &amp;modelCoords,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="classDocumentModelGeneral.html">DocumentModelGeneral</a> &amp;modelGeneral,</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="classMainWindowModel.html">MainWindowModel</a> &amp;modelMainWindow,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                                                 <span class="keyword">const</span> <a class="code" href="classTransformation.html">Transformation</a> &amp;transformation,</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                                                 CurveConnectAs connectAs,</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                                                 QString &amp;funcArea,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                                                 QString &amp;polyArea,</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                                                 QVector&lt;QString&gt; &amp;x,</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;                                                 QVector&lt;QString&gt; &amp;y,</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                                                 QVector&lt;QString&gt; &amp;distanceGraphForward,</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                                                 QVector&lt;QString&gt; &amp;distancePercentForward,</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                                                 QVector&lt;QString&gt; &amp;distanceGraphBackward,</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                                                 QVector&lt;QString&gt; &amp;distancePercentBackward)<span class="keyword"> const</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keywordflow">if</span> (transformation.<a class="code" href="classTransformation.html#aa4962ca8c4634378ab93723b5f403a25">transformIsDefined</a>()) {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    m_strategies [connectAs]-&gt;calculateGeometry (points,</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                                                 modelCoords,</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                                                 modelGeneral,</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                                                 modelMainWindow,</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                                                 transformation,</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                                                 funcArea,</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                                                 polyArea,</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                                                 x,</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                                                 y,</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                                                 distanceGraphForward,</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                                                 distancePercentForward,</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                                                 distanceGraphBackward,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                                                 distancePercentBackward);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;}</div><div class="ttc" id="classDocumentModelGeneral_html"><div class="ttname"><a href="classDocumentModelGeneral.html">DocumentModelGeneral</a></div><div class="ttdoc">Model for DlgSettingsGeneral and CmdSettingsGeneral. </div><div class="ttdef"><b>Definition:</b> <a href="DocumentModelGeneral_8h_source.html#l00016">DocumentModelGeneral.h:16</a></div></div>
<div class="ttc" id="classGeometryStrategyFunctionSmooth_html"><div class="ttname"><a href="classGeometryStrategyFunctionSmooth.html">GeometryStrategyFunctionSmooth</a></div><div class="ttdoc">Calculate for line through the points that is smoothly connected as a function. </div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyFunctionSmooth_8h_source.html#l00016">GeometryStrategyFunctionSmooth.h:16</a></div></div>
<div class="ttc" id="classGeometryStrategyFunctionStraight_html"><div class="ttname"><a href="classGeometryStrategyFunctionStraight.html">GeometryStrategyFunctionStraight</a></div><div class="ttdoc">Calculate for line through the points that is straightly connected as a function. ...</div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyFunctionStraight_8h_source.html#l00016">GeometryStrategyFunctionStraight.h:16</a></div></div>
<div class="ttc" id="classGeometryStrategyContext_html_a876c3fcc3bb3273e5cf102388d1ef554"><div class="ttname"><a href="classGeometryStrategyContext.html#a876c3fcc3bb3273e5cf102388d1ef554">GeometryStrategyContext::GeometryStrategyContext</a></div><div class="ttdeci">GeometryStrategyContext()</div><div class="ttdoc">Single constructor. </div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyContext_8cpp_source.html#l00015">GeometryStrategyContext.cpp:15</a></div></div>
<div class="ttc" id="classGeometryStrategyRelationSmooth_html"><div class="ttname"><a href="classGeometryStrategyRelationSmooth.html">GeometryStrategyRelationSmooth</a></div><div class="ttdoc">Calculate for line through the points that is smoothly connected as a relation. </div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyRelationSmooth_8h_source.html#l00016">GeometryStrategyRelationSmooth.h:16</a></div></div>
<div class="ttc" id="classTransformation_html"><div class="ttname"><a href="classTransformation.html">Transformation</a></div><div class="ttdoc">Affine transformation between screen and graph coordinates, based on digitized axis points...</div><div class="ttdef"><b>Definition:</b> <a href="Transformation_8h_source.html#l00031">Transformation.h:31</a></div></div>
<div class="ttc" id="classGeometryStrategyRelationStraight_html"><div class="ttname"><a href="classGeometryStrategyRelationStraight.html">GeometryStrategyRelationStraight</a></div><div class="ttdoc">Calculate for line through the points that is straightly connected as a relation. ...</div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyRelationStraight_8h_source.html#l00016">GeometryStrategyRelationStraight.h:16</a></div></div>
<div class="ttc" id="classMainWindowModel_html"><div class="ttname"><a href="classMainWindowModel.html">MainWindowModel</a></div><div class="ttdoc">Model for DlgSettingsMainWindow. </div><div class="ttdef"><b>Definition:</b> <a href="MainWindowModel_8h_source.html#l00027">MainWindowModel.h:27</a></div></div>
<div class="ttc" id="classDocumentModelCoords_html"><div class="ttname"><a href="classDocumentModelCoords.html">DocumentModelCoords</a></div><div class="ttdoc">Model for DlgSettingsCoords and CmdSettingsCoords. </div><div class="ttdef"><b>Definition:</b> <a href="DocumentModelCoords_8h_source.html#l00020">DocumentModelCoords.h:20</a></div></div>
<div class="ttc" id="classTransformation_html_aa4962ca8c4634378ab93723b5f403a25"><div class="ttname"><a href="classTransformation.html#aa4962ca8c4634378ab93723b5f403a25">Transformation::transformIsDefined</a></div><div class="ttdeci">bool transformIsDefined() const</div><div class="ttdoc">Transform is defined when at least three axis points have been digitized. </div><div class="ttdef"><b>Definition:</b> <a href="Transformation_8cpp_source.html#l00330">Transformation.cpp:330</a></div></div>
<div class="ttc" id="classGeometryStrategyContext_html_aac5d661910a228def8683cc85864559b"><div class="ttname"><a href="classGeometryStrategyContext.html#aac5d661910a228def8683cc85864559b">GeometryStrategyContext::calculateGeometry</a></div><div class="ttdeci">void calculateGeometry(const Points &amp;points, const DocumentModelCoords &amp;modelCoords, const DocumentModelGeneral &amp;modelGeneral, const MainWindowModel &amp;modelMainWindow, const Transformation &amp;transformation, CurveConnectAs connectAs, QString &amp;funcArea, QString &amp;polyArea, QVector&lt; QString &gt; &amp;x, QVector&lt; QString &gt; &amp;y, QVector&lt; QString &gt; &amp;distanceGraphForward, QVector&lt; QString &gt; &amp;distancePercentForward, QVector&lt; QString &gt; &amp;distanceGraphBackward, QVector&lt; QString &gt; &amp;distancePercentBackward) const</div><div class="ttdoc">Calculate geometry parameters. </div><div class="ttdef"><b>Definition:</b> <a href="GeometryStrategyContext_8cpp_source.html#l00027">GeometryStrategyContext.cpp:27</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Dec 25 2016 20:54:08 for Engauge Digitizer by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>