class_qwt_transform.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Qwt User&#39;s Guide: QwtTransform Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. </head>
  21. <body>
  22. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  23. <div id="titlearea">
  24. <table cellspacing="0" cellpadding="0">
  25. <tbody>
  26. <tr style="height: 56px;">
  27. <td id="projectalign" style="padding-left: 0.5em;">
  28. <div id="projectname">Qwt User&#39;s Guide
  29. &#160;<span id="projectnumber">6.1.6</span>
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('class_qwt_transform.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-methods">Public Member Functions</a> &#124;
  85. <a href="class_qwt_transform-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">QwtTransform Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>A transformation between coordinate systems.
  91. <a href="class_qwt_transform.html#details">More...</a></p>
  92. <p><code>#include &lt;<a class="el" href="qwt__transform_8h_source.html">qwt_transform.h</a>&gt;</code></p>
  93. <div class="dynheader">
  94. Inheritance diagram for QwtTransform:</div>
  95. <div class="dyncontent">
  96. <div class="center"><img src="class_qwt_transform__inherit__graph.png" border="0" usemap="#a_qwt_transform_inherit__map" alt="Inheritance graph"/></div>
  97. <map name="_qwt_transform_inherit__map" id="a_qwt_transform_inherit__map">
  98. <area shape="rect" title="A transformation between coordinate systems." alt="" coords="167,5,271,32"/>
  99. <area shape="rect" href="class_qwt_log_transform.html" title="Logarithmic transformation." alt="" coords="5,80,131,107"/>
  100. <area shape="rect" href="class_qwt_null_transform.html" title="Null transformation." alt="" coords="155,80,282,107"/>
  101. <area shape="rect" href="class_qwt_power_transform.html" title="A transformation using pow()" alt="" coords="306,80,446,107"/>
  102. </map>
  103. <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
  104. <table class="memberdecls">
  105. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  106. Public Member Functions</h2></td></tr>
  107. <tr class="memitem:aa1fa1ab21d0fc01e06d3a6e462008d0b"><td class="memItemLeft" align="right" valign="top"><a id="aa1fa1ab21d0fc01e06d3a6e462008d0b"></a>
  108. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#aa1fa1ab21d0fc01e06d3a6e462008d0b">QwtTransform</a> ()</td></tr>
  109. <tr class="memdesc:aa1fa1ab21d0fc01e06d3a6e462008d0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
  110. <tr class="separator:aa1fa1ab21d0fc01e06d3a6e462008d0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:aa2653db3104e672464dc569592fc14ab"><td class="memItemLeft" align="right" valign="top"><a id="aa2653db3104e672464dc569592fc14ab"></a>
  112. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#aa2653db3104e672464dc569592fc14ab">~QwtTransform</a> ()</td></tr>
  113. <tr class="memdesc:aa2653db3104e672464dc569592fc14ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
  114. <tr class="separator:aa2653db3104e672464dc569592fc14ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
  115. <tr class="memitem:aef97acf17f900905f2a93cec7f61e643"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#aef97acf17f900905f2a93cec7f61e643">bounded</a> (double value) const</td></tr>
  116. <tr class="separator:aef97acf17f900905f2a93cec7f61e643"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:a1093b5856cbc6cf812460535442fb130"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#a1093b5856cbc6cf812460535442fb130">transform</a> (double value) const =0</td></tr>
  118. <tr class="separator:a1093b5856cbc6cf812460535442fb130"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a5cfb0a329b8418028baf6974b188d76b"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#a5cfb0a329b8418028baf6974b188d76b">invTransform</a> (double value) const =0</td></tr>
  120. <tr class="separator:a5cfb0a329b8418028baf6974b188d76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  121. <tr class="memitem:aae011ee4205fa4391459766d88971809"><td class="memItemLeft" align="right" valign="top"><a id="aae011ee4205fa4391459766d88971809"></a>
  122. virtual <a class="el" href="class_qwt_transform.html">QwtTransform</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_transform.html#aae011ee4205fa4391459766d88971809">copy</a> () const =0</td></tr>
  123. <tr class="memdesc:aae011ee4205fa4391459766d88971809"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtualized copy operation. <br /></td></tr>
  124. <tr class="separator:aae011ee4205fa4391459766d88971809"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. </table>
  126. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  127. <div class="textblock"><p>A transformation between coordinate systems. </p>
  128. <p><a class="el" href="class_qwt_transform.html" title="A transformation between coordinate systems.">QwtTransform</a> manipulates values, when being mapped between the scale and the paint device coordinate system.</p>
  129. <p>A transformation consists of 2 methods:</p>
  130. <ul>
  131. <li>transform</li>
  132. <li>invTransform</li>
  133. </ul>
  134. <p>where one is is the inverse function of the other.</p>
  135. <p>When p1, p2 are the boundaries of the paint device coordinates and s1, s2 the boundaries of the scale, <a class="el" href="class_qwt_scale_map.html" title="A scale map.">QwtScaleMap</a> uses the following calculations:</p>
  136. <ul>
  137. <li>p = p1 + ( p2 - p1 ) * ( T( s ) - T( s1 ) / ( T( s2 ) - T( s1 ) );</li>
  138. <li>s = invT ( T( s1 ) + ( T( s2 ) - T( s1 ) ) * ( p - p1 ) / ( p2 - p1 ) ); </li>
  139. </ul>
  140. </div><h2 class="groupheader">Member Function Documentation</h2>
  141. <a id="aef97acf17f900905f2a93cec7f61e643"></a>
  142. <h2 class="memtitle"><span class="permalink"><a href="#aef97acf17f900905f2a93cec7f61e643">&#9670;&nbsp;</a></span>bounded()</h2>
  143. <div class="memitem">
  144. <div class="memproto">
  145. <table class="mlabels">
  146. <tr>
  147. <td class="mlabels-left">
  148. <table class="memname">
  149. <tr>
  150. <td class="memname">double QwtTransform::bounded </td>
  151. <td>(</td>
  152. <td class="paramtype">double&#160;</td>
  153. <td class="paramname"><em>value</em></td><td>)</td>
  154. <td> const</td>
  155. </tr>
  156. </table>
  157. </td>
  158. <td class="mlabels-right">
  159. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  160. </tr>
  161. </table>
  162. </div><div class="memdoc">
  163. <p>Modify value to be a valid value for the transformation. The default implementation does nothing.</p>
  164. <dl class="params"><dt>Parameters</dt><dd>
  165. <table class="params">
  166. <tr><td class="paramname">value</td><td>Value to be bounded </td></tr>
  167. </table>
  168. </dd>
  169. </dl>
  170. <dl class="section return"><dt>Returns</dt><dd>value unmodified </dd></dl>
  171. <p>Reimplemented in <a class="el" href="class_qwt_log_transform.html#a78fa3448e52f738c4907c3dc33874b9e">QwtLogTransform</a>.</p>
  172. </div>
  173. </div>
  174. <a id="a5cfb0a329b8418028baf6974b188d76b"></a>
  175. <h2 class="memtitle"><span class="permalink"><a href="#a5cfb0a329b8418028baf6974b188d76b">&#9670;&nbsp;</a></span>invTransform()</h2>
  176. <div class="memitem">
  177. <div class="memproto">
  178. <table class="mlabels">
  179. <tr>
  180. <td class="mlabels-left">
  181. <table class="memname">
  182. <tr>
  183. <td class="memname">virtual double QwtTransform::invTransform </td>
  184. <td>(</td>
  185. <td class="paramtype">double&#160;</td>
  186. <td class="paramname"><em>value</em></td><td>)</td>
  187. <td> const</td>
  188. </tr>
  189. </table>
  190. </td>
  191. <td class="mlabels-right">
  192. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  193. </tr>
  194. </table>
  195. </div><div class="memdoc">
  196. <p>Inverse transformation function</p>
  197. <dl class="params"><dt>Parameters</dt><dd>
  198. <table class="params">
  199. <tr><td class="paramname">value</td><td>Value </td></tr>
  200. </table>
  201. </dd>
  202. </dl>
  203. <dl class="section return"><dt>Returns</dt><dd>Modified value</dd></dl>
  204. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_transform.html#a1093b5856cbc6cf812460535442fb130">transform()</a> </dd></dl>
  205. <p>Implemented in <a class="el" href="class_qwt_power_transform.html#a474af795bf5362422e2be64da5e30b8c">QwtPowerTransform</a>, <a class="el" href="class_qwt_log_transform.html#a71a37e9762400eacbadb7d2c75456547">QwtLogTransform</a>, and <a class="el" href="class_qwt_null_transform.html#a33e7bd83a52c275ce5f1d04fa83a2a13">QwtNullTransform</a>.</p>
  206. </div>
  207. </div>
  208. <a id="a1093b5856cbc6cf812460535442fb130"></a>
  209. <h2 class="memtitle"><span class="permalink"><a href="#a1093b5856cbc6cf812460535442fb130">&#9670;&nbsp;</a></span>transform()</h2>
  210. <div class="memitem">
  211. <div class="memproto">
  212. <table class="mlabels">
  213. <tr>
  214. <td class="mlabels-left">
  215. <table class="memname">
  216. <tr>
  217. <td class="memname">virtual double QwtTransform::transform </td>
  218. <td>(</td>
  219. <td class="paramtype">double&#160;</td>
  220. <td class="paramname"><em>value</em></td><td>)</td>
  221. <td> const</td>
  222. </tr>
  223. </table>
  224. </td>
  225. <td class="mlabels-right">
  226. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  227. </tr>
  228. </table>
  229. </div><div class="memdoc">
  230. <p>Transformation function</p>
  231. <dl class="params"><dt>Parameters</dt><dd>
  232. <table class="params">
  233. <tr><td class="paramname">value</td><td>Value </td></tr>
  234. </table>
  235. </dd>
  236. </dl>
  237. <dl class="section return"><dt>Returns</dt><dd>Modified value</dd></dl>
  238. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_transform.html#a5cfb0a329b8418028baf6974b188d76b">invTransform()</a> </dd></dl>
  239. <p>Implemented in <a class="el" href="class_qwt_power_transform.html#aba383b41c251759121ab76e8a10437d0">QwtPowerTransform</a>, <a class="el" href="class_qwt_log_transform.html#ab1a9d0f598911bebfbd7c9e4fac371f5">QwtLogTransform</a>, and <a class="el" href="class_qwt_null_transform.html#af3fd9ac63c157ea3dab991d02d936972">QwtNullTransform</a>.</p>
  240. </div>
  241. </div>
  242. </div><!-- contents -->
  243. </div><!-- doc-content -->
  244. <!-- start footer part -->
  245. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  246. <ul>
  247. <li class="navelem"><a class="el" href="class_qwt_transform.html">QwtTransform</a></li>
  248. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  249. </ul>
  250. </div>
  251. </body>
  252. </html>