class_qwt_pixel_matrix.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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: QwtPixelMatrix 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_pixel_matrix.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_pixel_matrix-members.html">List of all members</a> </div>
  86. <div class="headertitle">
  87. <div class="title">QwtPixelMatrix Class Reference</div> </div>
  88. </div><!--header-->
  89. <div class="contents">
  90. <p>A bit field corresponding to the pixels of a rectangle.
  91. <a href="class_qwt_pixel_matrix.html#details">More...</a></p>
  92. <p><code>#include &lt;<a class="el" href="qwt__pixel__matrix_8h_source.html">qwt_pixel_matrix.h</a>&gt;</code></p>
  93. <div class="dynheader">
  94. Inheritance diagram for QwtPixelMatrix:</div>
  95. <div class="dyncontent">
  96. <div class="center"><img src="class_qwt_pixel_matrix__inherit__graph.png" border="0" usemap="#a_qwt_pixel_matrix_inherit__map" alt="Inheritance graph"/></div>
  97. <map name="_qwt_pixel_matrix_inherit__map" id="a_qwt_pixel_matrix_inherit__map">
  98. <area shape="rect" title="A bit field corresponding to the pixels of a rectangle." alt="" coords="5,80,116,107"/>
  99. <area shape="rect" title=" " alt="" coords="21,5,100,32"/>
  100. </map>
  101. <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
  102. <table class="memberdecls">
  103. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  104. Public Member Functions</h2></td></tr>
  105. <tr class="memitem:aa197eddf30db429ab267db2a875e7d71"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#aa197eddf30db429ab267db2a875e7d71">QwtPixelMatrix</a> (const QRect &amp;<a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a>)</td></tr>
  106. <tr class="memdesc:aa197eddf30db429ab267db2a875e7d71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="class_qwt_pixel_matrix.html#aa197eddf30db429ab267db2a875e7d71">More...</a><br /></td></tr>
  107. <tr class="separator:aa197eddf30db429ab267db2a875e7d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:a6691629e198fb39e6f653038cfb74f6b"><td class="memItemLeft" align="right" valign="top"><a id="a6691629e198fb39e6f653038cfb74f6b"></a>
  109. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a6691629e198fb39e6f653038cfb74f6b">~QwtPixelMatrix</a> ()</td></tr>
  110. <tr class="memdesc:a6691629e198fb39e6f653038cfb74f6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
  111. <tr class="separator:a6691629e198fb39e6f653038cfb74f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <tr class="memitem:ae8150f8d1f1922746172e9da1488e98b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#ae8150f8d1f1922746172e9da1488e98b">setRect</a> (const QRect &amp;<a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a>)</td></tr>
  113. <tr class="separator:ae8150f8d1f1922746172e9da1488e98b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a8194b741d283b9aa3a5c4b4e7d2a530f"><td class="memItemLeft" align="right" valign="top">QRect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect</a> () const</td></tr>
  115. <tr class="separator:a8194b741d283b9aa3a5c4b4e7d2a530f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a0002dae3824ca4f7b09ecb65ffaaf93b">testPixel</a> (int x, int y) const</td></tr>
  117. <tr class="memdesc:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a pixel has been set. <a href="class_qwt_pixel_matrix.html#a0002dae3824ca4f7b09ecb65ffaaf93b">More...</a><br /></td></tr>
  118. <tr class="separator:a0002dae3824ca4f7b09ecb65ffaaf93b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a51c2ecd161c0c93dccb62fcf640ff280"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#a51c2ecd161c0c93dccb62fcf640ff280">testAndSetPixel</a> (int x, int y, bool on)</td></tr>
  120. <tr class="memdesc:a51c2ecd161c0c93dccb62fcf640ff280"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a pixel and test if a pixel has been set before. <a href="class_qwt_pixel_matrix.html#a51c2ecd161c0c93dccb62fcf640ff280">More...</a><br /></td></tr>
  121. <tr class="separator:a51c2ecd161c0c93dccb62fcf640ff280"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:ab76786bae3b4b28300b77ca09ad2ce1a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_pixel_matrix.html#ab76786bae3b4b28300b77ca09ad2ce1a">index</a> (int x, int y) const</td></tr>
  123. <tr class="memdesc:ab76786bae3b4b28300b77ca09ad2ce1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the index in the bit field corresponding to a position. <a href="class_qwt_pixel_matrix.html#ab76786bae3b4b28300b77ca09ad2ce1a">More...</a><br /></td></tr>
  124. <tr class="separator:ab76786bae3b4b28300b77ca09ad2ce1a"><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 bit field corresponding to the pixels of a rectangle. </p>
  128. <p><a class="el" href="class_qwt_pixel_matrix.html" title="A bit field corresponding to the pixels of a rectangle.">QwtPixelMatrix</a> is intended to filter out duplicates in an unsorted array of points. </p>
  129. </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  130. <a id="aa197eddf30db429ab267db2a875e7d71"></a>
  131. <h2 class="memtitle"><span class="permalink"><a href="#aa197eddf30db429ab267db2a875e7d71">&#9670;&nbsp;</a></span>QwtPixelMatrix()</h2>
  132. <div class="memitem">
  133. <div class="memproto">
  134. <table class="memname">
  135. <tr>
  136. <td class="memname">QwtPixelMatrix::QwtPixelMatrix </td>
  137. <td>(</td>
  138. <td class="paramtype">const QRect &amp;&#160;</td>
  139. <td class="paramname"><em>rect</em></td><td>)</td>
  140. <td></td>
  141. </tr>
  142. </table>
  143. </div><div class="memdoc">
  144. <p>Constructor. </p>
  145. <dl class="params"><dt>Parameters</dt><dd>
  146. <table class="params">
  147. <tr><td class="paramname">rect</td><td>Bounding rectangle for the matrix </td></tr>
  148. </table>
  149. </dd>
  150. </dl>
  151. </div>
  152. </div>
  153. <h2 class="groupheader">Member Function Documentation</h2>
  154. <a id="ab76786bae3b4b28300b77ca09ad2ce1a"></a>
  155. <h2 class="memtitle"><span class="permalink"><a href="#ab76786bae3b4b28300b77ca09ad2ce1a">&#9670;&nbsp;</a></span>index()</h2>
  156. <div class="memitem">
  157. <div class="memproto">
  158. <table class="mlabels">
  159. <tr>
  160. <td class="mlabels-left">
  161. <table class="memname">
  162. <tr>
  163. <td class="memname">int QwtPixelMatrix::index </td>
  164. <td>(</td>
  165. <td class="paramtype">int&#160;</td>
  166. <td class="paramname"><em>x</em>, </td>
  167. </tr>
  168. <tr>
  169. <td class="paramkey"></td>
  170. <td></td>
  171. <td class="paramtype">int&#160;</td>
  172. <td class="paramname"><em>y</em>&#160;</td>
  173. </tr>
  174. <tr>
  175. <td></td>
  176. <td>)</td>
  177. <td></td><td> const</td>
  178. </tr>
  179. </table>
  180. </td>
  181. <td class="mlabels-right">
  182. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  183. </tr>
  184. </table>
  185. </div><div class="memdoc">
  186. <p>Calculate the index in the bit field corresponding to a position. </p>
  187. <dl class="params"><dt>Parameters</dt><dd>
  188. <table class="params">
  189. <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
  190. <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
  191. </table>
  192. </dd>
  193. </dl>
  194. <dl class="section return"><dt>Returns</dt><dd>Index, when <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a> contains pos - otherwise -1. </dd></dl>
  195. </div>
  196. </div>
  197. <a id="a8194b741d283b9aa3a5c4b4e7d2a530f"></a>
  198. <h2 class="memtitle"><span class="permalink"><a href="#a8194b741d283b9aa3a5c4b4e7d2a530f">&#9670;&nbsp;</a></span>rect()</h2>
  199. <div class="memitem">
  200. <div class="memproto">
  201. <table class="memname">
  202. <tr>
  203. <td class="memname">QRect QwtPixelMatrix::rect </td>
  204. <td>(</td>
  205. <td class="paramname"></td><td>)</td>
  206. <td> const</td>
  207. </tr>
  208. </table>
  209. </div><div class="memdoc">
  210. <dl class="section return"><dt>Returns</dt><dd>Bounding rectangle </dd></dl>
  211. </div>
  212. </div>
  213. <a id="ae8150f8d1f1922746172e9da1488e98b"></a>
  214. <h2 class="memtitle"><span class="permalink"><a href="#ae8150f8d1f1922746172e9da1488e98b">&#9670;&nbsp;</a></span>setRect()</h2>
  215. <div class="memitem">
  216. <div class="memproto">
  217. <table class="memname">
  218. <tr>
  219. <td class="memname">void QwtPixelMatrix::setRect </td>
  220. <td>(</td>
  221. <td class="paramtype">const QRect &amp;&#160;</td>
  222. <td class="paramname"><em>rect</em></td><td>)</td>
  223. <td></td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>Set the bounding rectangle of the matrix</p>
  228. <dl class="params"><dt>Parameters</dt><dd>
  229. <table class="params">
  230. <tr><td class="paramname">rect</td><td>Bounding rectangle</td></tr>
  231. </table>
  232. </dd>
  233. </dl>
  234. <dl class="section note"><dt>Note</dt><dd>All bits are cleared </dd></dl>
  235. </div>
  236. </div>
  237. <a id="a51c2ecd161c0c93dccb62fcf640ff280"></a>
  238. <h2 class="memtitle"><span class="permalink"><a href="#a51c2ecd161c0c93dccb62fcf640ff280">&#9670;&nbsp;</a></span>testAndSetPixel()</h2>
  239. <div class="memitem">
  240. <div class="memproto">
  241. <table class="mlabels">
  242. <tr>
  243. <td class="mlabels-left">
  244. <table class="memname">
  245. <tr>
  246. <td class="memname">bool QwtPixelMatrix::testAndSetPixel </td>
  247. <td>(</td>
  248. <td class="paramtype">int&#160;</td>
  249. <td class="paramname"><em>x</em>, </td>
  250. </tr>
  251. <tr>
  252. <td class="paramkey"></td>
  253. <td></td>
  254. <td class="paramtype">int&#160;</td>
  255. <td class="paramname"><em>y</em>, </td>
  256. </tr>
  257. <tr>
  258. <td class="paramkey"></td>
  259. <td></td>
  260. <td class="paramtype">bool&#160;</td>
  261. <td class="paramname"><em>on</em>&#160;</td>
  262. </tr>
  263. <tr>
  264. <td></td>
  265. <td>)</td>
  266. <td></td><td></td>
  267. </tr>
  268. </table>
  269. </td>
  270. <td class="mlabels-right">
  271. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  272. </tr>
  273. </table>
  274. </div><div class="memdoc">
  275. <p>Set a pixel and test if a pixel has been set before. </p>
  276. <dl class="params"><dt>Parameters</dt><dd>
  277. <table class="params">
  278. <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
  279. <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
  280. <tr><td class="paramname">on</td><td>Set/Clear the pixel</td></tr>
  281. </table>
  282. </dd>
  283. </dl>
  284. <dl class="section return"><dt>Returns</dt><dd>true, when pos is outside of <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a>, or when the pixel was set before. </dd></dl>
  285. </div>
  286. </div>
  287. <a id="a0002dae3824ca4f7b09ecb65ffaaf93b"></a>
  288. <h2 class="memtitle"><span class="permalink"><a href="#a0002dae3824ca4f7b09ecb65ffaaf93b">&#9670;&nbsp;</a></span>testPixel()</h2>
  289. <div class="memitem">
  290. <div class="memproto">
  291. <table class="mlabels">
  292. <tr>
  293. <td class="mlabels-left">
  294. <table class="memname">
  295. <tr>
  296. <td class="memname">bool QwtPixelMatrix::testPixel </td>
  297. <td>(</td>
  298. <td class="paramtype">int&#160;</td>
  299. <td class="paramname"><em>x</em>, </td>
  300. </tr>
  301. <tr>
  302. <td class="paramkey"></td>
  303. <td></td>
  304. <td class="paramtype">int&#160;</td>
  305. <td class="paramname"><em>y</em>&#160;</td>
  306. </tr>
  307. <tr>
  308. <td></td>
  309. <td>)</td>
  310. <td></td><td> const</td>
  311. </tr>
  312. </table>
  313. </td>
  314. <td class="mlabels-right">
  315. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  316. </tr>
  317. </table>
  318. </div><div class="memdoc">
  319. <p>Test if a pixel has been set. </p>
  320. <dl class="params"><dt>Parameters</dt><dd>
  321. <table class="params">
  322. <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
  323. <tr><td class="paramname">y</td><td>Y-coordinate</td></tr>
  324. </table>
  325. </dd>
  326. </dl>
  327. <dl class="section return"><dt>Returns</dt><dd>true, when pos is outside of <a class="el" href="class_qwt_pixel_matrix.html#a8194b741d283b9aa3a5c4b4e7d2a530f">rect()</a>, or when the pixel has already been set. </dd></dl>
  328. </div>
  329. </div>
  330. </div><!-- contents -->
  331. </div><!-- doc-content -->
  332. <!-- start footer part -->
  333. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  334. <ul>
  335. <li class="navelem"><a class="el" href="class_qwt_pixel_matrix.html">QwtPixelMatrix</a></li>
  336. <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>
  337. </ul>
  338. </div>
  339. </body>
  340. </html>