<!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.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>tesseract: textord/scanedg.cpp 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="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</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">tesseract  <span id="projectnumber">3.05.02</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('a01397.html','');}); /* @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"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#define-members">Macros</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">scanedg.cpp File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="a01400_source.html">scanedg.h</a>"</code><br /> <code>#include "allheaders.h"</code><br /> <code>#include "<a class="el" href="a01340_source.html">edgloop.h</a>"</code><br /> </div> <p><a href="a01397_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 name="define-members"></a> Macros</h2></td></tr> <tr class="memitem:a5c91c3924c21f1e24a333317e8d08a74"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a5c91c3924c21f1e24a333317e8d08a74">WHITE_PIX</a>   1 /*thresholded colours */</td></tr> <tr class="separator:a5c91c3924c21f1e24a333317e8d08a74"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a31503e4b0f23137edefe782ad5632878"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a31503e4b0f23137edefe782ad5632878">BLACK_PIX</a>   0</td></tr> <tr class="separator:a31503e4b0f23137edefe782ad5632878"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a29f11db4ed3af442549b1de233ac4739"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a29f11db4ed3af442549b1de233ac4739">FLIP_COLOUR</a>(pix)   (1-(pix))</td></tr> <tr class="separator:a29f11db4ed3af442549b1de233ac4739"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a5dbfbe6d87bf9d8f4c2cb616a7a3118a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a5dbfbe6d87bf9d8f4c2cb616a7a3118a">block_edges</a> (Pix *t_pix, <a class="el" href="a02661.html">PDBLK</a> *block, C_OUTLINE_IT *outline_it)</td></tr> <tr class="separator:a5dbfbe6d87bf9d8f4c2cb616a7a3118a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7265d5ee56fbab9229a8f39e28d38458"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a7265d5ee56fbab9229a8f39e28d38458">make_margins</a> (<a class="el" href="a02661.html">PDBLK</a> *block, <a class="el" href="a02669.html">BLOCK_LINE_IT</a> *line_it, <a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> *pixels, <a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> margin, <a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> left, <a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> right, <a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> y)</td></tr> <tr class="separator:a7265d5ee56fbab9229a8f39e28d38458"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab24d6aa53a42392537afadfb6333b489"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#ab24d6aa53a42392537afadfb6333b489">line_edges</a> (<a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> x, <a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> y, <a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> xext, <a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> uppercolour, <a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> *bwpos, <a class="el" href="a02529.html">CRACKEDGE</a> **prevline, <a class="el" href="a02529.html">CRACKEDGE</a> **free_cracks, C_OUTLINE_IT *outline_it)</td></tr> <tr class="separator:ab24d6aa53a42392537afadfb6333b489"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a06f8ee398cd3556fc0d40c5decd25745"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a02529.html">CRACKEDGE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a> (int sign, <a class="el" href="a02529.html">CRACKEDGE</a> *<a class="el" href="a01124.html#a185e827874145ed10ce9db702a34f671">join</a>, <a class="el" href="a04789.html">CrackPos</a> *pos)</td></tr> <tr class="separator:a06f8ee398cd3556fc0d40c5decd25745"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9f6f7cf3af410407129ae07523fde0db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a02529.html">CRACKEDGE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a> (int sign, <a class="el" href="a02529.html">CRACKEDGE</a> *<a class="el" href="a01124.html#a185e827874145ed10ce9db702a34f671">join</a>, <a class="el" href="a04789.html">CrackPos</a> *pos)</td></tr> <tr class="separator:a9f6f7cf3af410407129ae07523fde0db"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6e23861c825d8a8e48c8b26d75e0b715"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a6e23861c825d8a8e48c8b26d75e0b715">join_edges</a> (<a class="el" href="a02529.html">CRACKEDGE</a> *edge1, <a class="el" href="a02529.html">CRACKEDGE</a> *edge2, <a class="el" href="a02529.html">CRACKEDGE</a> **free_cracks, C_OUTLINE_IT *outline_it)</td></tr> <tr class="separator:a6e23861c825d8a8e48c8b26d75e0b715"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a19b3430c0ac6e770e54b8b52a9a991c5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a01397.html#a19b3430c0ac6e770e54b8b52a9a991c5">free_crackedges</a> (<a class="el" href="a02529.html">CRACKEDGE</a> *start)</td></tr> <tr class="separator:a19b3430c0ac6e770e54b8b52a9a991c5"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Macro Definition Documentation</h2> <a id="a31503e4b0f23137edefe782ad5632878"></a> <h2 class="memtitle"><span class="permalink"><a href="#a31503e4b0f23137edefe782ad5632878">◆ </a></span>BLACK_PIX</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define BLACK_PIX   0</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00026">26</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> </div> </div> <a id="a29f11db4ed3af442549b1de233ac4739"></a> <h2 class="memtitle"><span class="permalink"><a href="#a29f11db4ed3af442549b1de233ac4739">◆ </a></span>FLIP_COLOUR</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define FLIP_COLOUR</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname">pix</td><td>)</td> <td>   (1-(pix))</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00028">28</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> </div> </div> <a id="a5c91c3924c21f1e24a333317e8d08a74"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5c91c3924c21f1e24a333317e8d08a74">◆ </a></span>WHITE_PIX</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define WHITE_PIX   1 /*thresholded colours */</td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00025">25</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a id="a5dbfbe6d87bf9d8f4c2cb616a7a3118a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5dbfbe6d87bf9d8f4c2cb616a7a3118a">◆ </a></span>block_edges()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void block_edges </td> <td>(</td> <td class="paramtype">Pix * </td> <td class="paramname"><em>t_pix</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02661.html">PDBLK</a> * </td> <td class="paramname"><em>block</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">C_OUTLINE_IT * </td> <td class="paramname"><em>outline_it</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00036">36</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="a02673.html">ICOORD</a> bleft; <span class="comment">// bounding box</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <a class="code" href="a02673.html">ICOORD</a> tright;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="a02669.html">BLOCK_LINE_IT</a> line_it = block; <span class="comment">// line iterator</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">int</span> width = pixGetWidth(t_pix);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">int</span> height = pixGetHeight(t_pix);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordtype">int</span> wpl = pixGetWpl(t_pix);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// lines in progress</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="a02529.html">CRACKEDGE</a> **ptrline = <span class="keyword">new</span> <a class="code" href="a02529.html">CRACKEDGE</a>*[width + 1];</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *free_cracks = NULL;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  block-><a class="code" href="a02661.html#a3f06f8e34fc5962f342daff9623463e9">bounding_box</a>(bleft, tright); <span class="comment">// block box</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordtype">int</span> block_width = tright.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>() - bleft.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>();</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = block_width; x >= 0; x--)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  ptrline[x] = NULL; <span class="comment">// no lines in progress</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a>* bwline = <span class="keyword">new</span> <a class="code" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a>[width];</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> margin = <a class="code" href="a01397.html#a5c91c3924c21f1e24a333317e8d08a74">WHITE_PIX</a>;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = tright.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() - 1; y >= bleft.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() - 1; y--) {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">if</span> (y >= bleft.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() && y < tright.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>()) {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// Get the binary pixels from the image.</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  l_uint32* line = pixGetData(t_pix) + wpl * (height - 1 - y);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x < block_width; ++x) {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  bwline[x] = GET_DATA_BIT(line, x + bleft.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>()) ^ 1;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="a01397.html#a7265d5ee56fbab9229a8f39e28d38458">make_margins</a>(block, &line_it, bwline, margin, bleft.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>(), tright.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>(), y);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  memset(bwline, margin, block_width * <span class="keyword">sizeof</span>(bwline[0]));</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="a01397.html#ab24d6aa53a42392537afadfb6333b489">line_edges</a>(bleft.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>(), y, block_width,</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  margin, bwline, ptrline, &free_cracks, outline_it);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="a01397.html#a19b3430c0ac6e770e54b8b52a9a991c5">free_crackedges</a>(free_cracks); <span class="comment">// really free them</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">delete</span>[] ptrline;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">delete</span>[] bwline;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> }</div><div class="ttc" id="a02673_html"><div class="ttname"><a href="a02673.html">ICOORD</a></div><div class="ttdoc">integer coordinate </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00030">points.h:30</a></div></div> <div class="ttc" id="a01397_html_a7265d5ee56fbab9229a8f39e28d38458"><div class="ttname"><a href="a01397.html#a7265d5ee56fbab9229a8f39e28d38458">make_margins</a></div><div class="ttdeci">void make_margins(PDBLK *block, BLOCK_LINE_IT *line_it, uinT8 *pixels, uinT8 margin, inT16 left, inT16 right, inT16 y)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00086">scanedg.cpp:86</a></div></div> <div class="ttc" id="a00524_html_a458fe97f82495945f8071bb3c18d1783"><div class="ttname"><a href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a></div><div class="ttdeci">unsigned char uinT8</div><div class="ttdef"><b>Definition:</b> <a href="a00524_source.html#l00032">host.h:32</a></div></div> <div class="ttc" id="a01397_html_a5c91c3924c21f1e24a333317e8d08a74"><div class="ttname"><a href="a01397.html#a5c91c3924c21f1e24a333317e8d08a74">WHITE_PIX</a></div><div class="ttdeci">#define WHITE_PIX</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00025">scanedg.cpp:25</a></div></div> <div class="ttc" id="a02673_html_afa32b2bf89dd489bf4fd168bdd01742c"><div class="ttname"><a href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">ICOORD::x</a></div><div class="ttdeci">inT16 x() const</div><div class="ttdoc">access function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00052">points.h:52</a></div></div> <div class="ttc" id="a01397_html_a19b3430c0ac6e770e54b8b52a9a991c5"><div class="ttname"><a href="a01397.html#a19b3430c0ac6e770e54b8b52a9a991c5">free_crackedges</a></div><div class="ttdeci">void free_crackedges(CRACKEDGE *start)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00364">scanedg.cpp:364</a></div></div> <div class="ttc" id="a01397_html_ab24d6aa53a42392537afadfb6333b489"><div class="ttname"><a href="a01397.html#ab24d6aa53a42392537afadfb6333b489">line_edges</a></div><div class="ttdeci">void line_edges(inT16 x, inT16 y, inT16 xext, uinT8 uppercolour, uinT8 *bwpos, CRACKEDGE **prevline, CRACKEDGE **free_cracks, C_OUTLINE_IT *outline_it)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00144">scanedg.cpp:144</a></div></div> <div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a02669_html"><div class="ttname"><a href="a02669.html">BLOCK_LINE_IT</a></div><div class="ttdoc">rectangle iterator </div><div class="ttdef"><b>Definition:</b> <a href="a00350_source.html#l00144">pdblock.h:144</a></div></div> <div class="ttc" id="a02661_html_a3f06f8e34fc5962f342daff9623463e9"><div class="ttname"><a href="a02661.html#a3f06f8e34fc5962f342daff9623463e9">PDBLK::bounding_box</a></div><div class="ttdeci">void bounding_box(ICOORD &bottom_left, ICOORD &top_right) const</div><div class="ttdoc">get box </div><div class="ttdef"><b>Definition:</b> <a href="a00350_source.html#l00059">pdblock.h:59</a></div></div> <div class="ttc" id="a02673_html_a89a73d28596830e7a72164f87fa5805d"><div class="ttname"><a href="a02673.html#a89a73d28596830e7a72164f87fa5805d">ICOORD::y</a></div><div class="ttdeci">inT16 y() const</div><div class="ttdoc">access_function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00056">points.h:56</a></div></div> </div><!-- fragment --> </div> </div> <a id="a19b3430c0ac6e770e54b8b52a9a991c5"></a> <h2 class="memtitle"><span class="permalink"><a href="#a19b3430c0ac6e770e54b8b52a9a991c5">◆ </a></span>free_crackedges()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void free_crackedges </td> <td>(</td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> * </td> <td class="paramname"><em>start</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00364">364</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *current; <span class="comment">// current edge to free</span></div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *next; <span class="comment">// next one to free</span></div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> </div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordflow">for</span> (current = start; current != NULL; current = next) {</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  next = current-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>;</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keyword">delete</span> current; <span class="comment">// delete them all</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  }</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> }</div><div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a02529_html_a65662bdae2f4b5a3b670791fa6d6d44a"><div class="ttname"><a href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">CRACKEDGE::next</a></div><div class="ttdeci">CRACKEDGE * next</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00035">crakedge.h:35</a></div></div> </div><!-- fragment --> </div> </div> <a id="a06f8ee398cd3556fc0d40c5decd25745"></a> <h2 class="memtitle"><span class="permalink"><a href="#a06f8ee398cd3556fc0d40c5decd25745">◆ </a></span>h_edge()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a02529.html">CRACKEDGE</a>* h_edge </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>sign</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> * </td> <td class="paramname"><em>join</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a04789.html">CrackPos</a> * </td> <td class="paramname"><em>pos</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00228">228</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  {</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *newpt; <span class="comment">// return value</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordflow">if</span> (*pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a> != NULL) {</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  newpt = *pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a>;</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  *pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a> = newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>; <span class="comment">// get one fast</span></div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  newpt = <span class="keyword">new</span> <a class="code" href="a02529.html">CRACKEDGE</a>;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#aa9fb418d1c602c0533e426759da43d67">set_y</a>(pos-><a class="code" href="a04789.html#a71d7e214daf3a1ce26ee03037a0f0caf">y</a> + 1); <span class="comment">// coords of pt</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  newpt-><a class="code" href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">stepy</a> = 0; <span class="comment">// edge is horizontal</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordflow">if</span> (sign > 0) {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a94c586039b3a003b35cf659b33b938f3">set_x</a>(pos-><a class="code" href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">x</a> + 1); <span class="comment">// start location</span></div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  newpt-><a class="code" href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">stepx</a> = -1;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  newpt-><a class="code" href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">stepdir</a> = 0;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a94c586039b3a003b35cf659b33b938f3">set_x</a>(pos-><a class="code" href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">x</a>); <span class="comment">// start location</span></div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  newpt-><a class="code" href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">stepx</a> = 1;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  newpt-><a class="code" href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">stepdir</a> = 2;</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  }</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">if</span> (<a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a> == NULL) {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = newpt; <span class="comment">// ptrs to other ends</span></div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = newpt;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">if</span> (newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>() + newpt-><a class="code" href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">stepx</a> == <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->pos.x()</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  && newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() == <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->pos.y()) {</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->prev; <span class="comment">// update other ends</span></div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a>-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = newpt;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>; <span class="comment">// join up</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->prev = newpt;</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>-><a class="code" href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">next</a>; <span class="comment">// update other ends</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = newpt;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>; <span class="comment">// join up</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>-><a class="code" href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">next</a> = newpt;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  }</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  }</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">return</span> newpt;</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> }</div><div class="ttc" id="a02529_html_a907cb1dc30d54151b7bd96a8ab90f207"><div class="ttname"><a href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">CRACKEDGE::stepx</a></div><div class="ttdeci">inT8 stepx</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00031">crakedge.h:31</a></div></div> <div class="ttc" id="a04789_html_a152fb63ed25f1545f1d10a1a80466bd4"><div class="ttname"><a href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">CrackPos::x</a></div><div class="ttdeci">int x</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00032">scanedg.h:32</a></div></div> <div class="ttc" id="a02529_html_a9d7eda07653a7c0831d92630a1668dc3"><div class="ttname"><a href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">CRACKEDGE::stepdir</a></div><div class="ttdeci">inT8 stepdir</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00033">crakedge.h:33</a></div></div> <div class="ttc" id="a04789_html_ad0f5bf625d55d94e09e5a5f4e920461e"><div class="ttname"><a href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">CrackPos::free_cracks</a></div><div class="ttdeci">CRACKEDGE ** free_cracks</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00031">scanedg.h:31</a></div></div> <div class="ttc" id="a01121_html_a185e827874145ed10ce9db702a34f671"><div class="ttname"><a href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a></div><div class="ttdeci">LIST join(LIST list1, LIST list2)</div><div class="ttdef"><b>Definition:</b> <a href="a01121_source.html#l00258">oldlist.cpp:258</a></div></div> <div class="ttc" id="a02529_html_ae7bcdb1f6f28f612a0ff4ace03b38165"><div class="ttname"><a href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">CRACKEDGE::pos</a></div><div class="ttdeci">ICOORD pos</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00030">crakedge.h:30</a></div></div> <div class="ttc" id="a02673_html_afa32b2bf89dd489bf4fd168bdd01742c"><div class="ttname"><a href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">ICOORD::x</a></div><div class="ttdeci">inT16 x() const</div><div class="ttdoc">access function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00052">points.h:52</a></div></div> <div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a02529_html_a25eed9381f5de431869fd4d61fdbd15d"><div class="ttname"><a href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">CRACKEDGE::stepy</a></div><div class="ttdeci">inT8 stepy</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00032">crakedge.h:32</a></div></div> <div class="ttc" id="a02529_html_a65662bdae2f4b5a3b670791fa6d6d44a"><div class="ttname"><a href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">CRACKEDGE::next</a></div><div class="ttdeci">CRACKEDGE * next</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00035">crakedge.h:35</a></div></div> <div class="ttc" id="a04517_html_af4f6ed22cbbd6d68b0bc4505defed426"><div class="ttname"><a href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">list_rec::next</a></div><div class="ttdeci">struct list_rec * next</div><div class="ttdef"><b>Definition:</b> <a href="a01124_source.html#l00130">oldlist.h:130</a></div></div> <div class="ttc" id="a02673_html_aa9fb418d1c602c0533e426759da43d67"><div class="ttname"><a href="a02673.html#aa9fb418d1c602c0533e426759da43d67">ICOORD::set_y</a></div><div class="ttdeci">void set_y(inT16 yin)</div><div class="ttdoc">rewrite function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00065">points.h:65</a></div></div> <div class="ttc" id="a02673_html_a94c586039b3a003b35cf659b33b938f3"><div class="ttname"><a href="a02673.html#a94c586039b3a003b35cf659b33b938f3">ICOORD::set_x</a></div><div class="ttdeci">void set_x(inT16 xin)</div><div class="ttdoc">rewrite function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00061">points.h:61</a></div></div> <div class="ttc" id="a02529_html_a22411a30eb2b7529ccb755dc3971b0d1"><div class="ttname"><a href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">CRACKEDGE::prev</a></div><div class="ttdeci">CRACKEDGE * prev</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00034">crakedge.h:34</a></div></div> <div class="ttc" id="a04789_html_a71d7e214daf3a1ce26ee03037a0f0caf"><div class="ttname"><a href="a04789.html#a71d7e214daf3a1ce26ee03037a0f0caf">CrackPos::y</a></div><div class="ttdeci">int y</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00033">scanedg.h:33</a></div></div> <div class="ttc" id="a02673_html_a89a73d28596830e7a72164f87fa5805d"><div class="ttname"><a href="a02673.html#a89a73d28596830e7a72164f87fa5805d">ICOORD::y</a></div><div class="ttdeci">inT16 y() const</div><div class="ttdoc">access_function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00056">points.h:56</a></div></div> </div><!-- fragment --> </div> </div> <a id="a6e23861c825d8a8e48c8b26d75e0b715"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6e23861c825d8a8e48c8b26d75e0b715">◆ </a></span>join_edges()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void join_edges </td> <td>(</td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> * </td> <td class="paramname"><em>edge1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> * </td> <td class="paramname"><em>edge2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> ** </td> <td class="paramname"><em>free_cracks</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">C_OUTLINE_IT * </td> <td class="paramname"><em>outline_it</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00331">331</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  {</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordflow">if</span> (edge1-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>() + edge1-><a class="code" href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">stepx</a> != edge2-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>()</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  || edge1-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() + edge1-><a class="code" href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">stepy</a> != edge2-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>()) {</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *tempedge = edge1;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  edge1 = edge2; <span class="comment">// swap around</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  edge2 = tempedge;</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  }</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span> </div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordflow">if</span> (edge1-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> == edge2) {</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="comment">// already closed</span></div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <a class="code" href="a01337.html#affa66849c6f718f217c84b000407944b">complete_edge</a>(edge1, outline_it);</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="comment">// attach freelist to end</span></div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  edge1-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a>-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = *free_cracks;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  *free_cracks = edge1; <span class="comment">// and free list</span></div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="comment">// update opposite ends</span></div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  edge2-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a>-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = edge1-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>;</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  edge1-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = edge2-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a>;</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  edge1-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = edge2; <span class="comment">// make joins</span></div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  edge2-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = edge1;</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  }</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span> }</div><div class="ttc" id="a02529_html_a907cb1dc30d54151b7bd96a8ab90f207"><div class="ttname"><a href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">CRACKEDGE::stepx</a></div><div class="ttdeci">inT8 stepx</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00031">crakedge.h:31</a></div></div> <div class="ttc" id="a01337_html_affa66849c6f718f217c84b000407944b"><div class="ttname"><a href="a01337.html#affa66849c6f718f217c84b000407944b">complete_edge</a></div><div class="ttdeci">void complete_edge(CRACKEDGE *start, C_OUTLINE_IT *outline_it)</div><div class="ttdef"><b>Definition:</b> <a href="a01337_source.html#l00037">edgloop.cpp:37</a></div></div> <div class="ttc" id="a02529_html_ae7bcdb1f6f28f612a0ff4ace03b38165"><div class="ttname"><a href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">CRACKEDGE::pos</a></div><div class="ttdeci">ICOORD pos</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00030">crakedge.h:30</a></div></div> <div class="ttc" id="a02673_html_afa32b2bf89dd489bf4fd168bdd01742c"><div class="ttname"><a href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">ICOORD::x</a></div><div class="ttdeci">inT16 x() const</div><div class="ttdoc">access function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00052">points.h:52</a></div></div> <div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a02529_html_a25eed9381f5de431869fd4d61fdbd15d"><div class="ttname"><a href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">CRACKEDGE::stepy</a></div><div class="ttdeci">inT8 stepy</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00032">crakedge.h:32</a></div></div> <div class="ttc" id="a02529_html_a65662bdae2f4b5a3b670791fa6d6d44a"><div class="ttname"><a href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">CRACKEDGE::next</a></div><div class="ttdeci">CRACKEDGE * next</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00035">crakedge.h:35</a></div></div> <div class="ttc" id="a02529_html_a22411a30eb2b7529ccb755dc3971b0d1"><div class="ttname"><a href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">CRACKEDGE::prev</a></div><div class="ttdeci">CRACKEDGE * prev</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00034">crakedge.h:34</a></div></div> <div class="ttc" id="a02673_html_a89a73d28596830e7a72164f87fa5805d"><div class="ttname"><a href="a02673.html#a89a73d28596830e7a72164f87fa5805d">ICOORD::y</a></div><div class="ttdeci">inT16 y() const</div><div class="ttdoc">access_function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00056">points.h:56</a></div></div> </div><!-- fragment --> </div> </div> <a id="ab24d6aa53a42392537afadfb6333b489"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab24d6aa53a42392537afadfb6333b489">◆ </a></span>line_edges()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void line_edges </td> <td>(</td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>y</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>xext</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> </td> <td class="paramname"><em>uppercolour</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> * </td> <td class="paramname"><em>bwpos</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> ** </td> <td class="paramname"><em>prevline</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> ** </td> <td class="paramname"><em>free_cracks</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">C_OUTLINE_IT * </td> <td class="paramname"><em>outline_it</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00144">144</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="code" href="a04789.html">CrackPos</a> pos = {free_cracks, x, y };</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordtype">int</span> xmax; <span class="comment">// max x coord</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordtype">int</span> colour; <span class="comment">// of current pixel</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordtype">int</span> prevcolour; <span class="comment">// of previous pixel</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *current; <span class="comment">// current h edge</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *newcurrent; <span class="comment">// new h edge</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  xmax = x + xext; <span class="comment">// max allowable coord</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  prevcolour = uppercolour; <span class="comment">// forced plain margin</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  current = NULL; <span class="comment">// nothing yet</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// do each pixel</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">for</span> (; pos.<a class="code" href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">x</a> < xmax; pos.<a class="code" href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">x</a>++, prevline++) {</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  colour = *bwpos++; <span class="comment">// current pixel</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">if</span> (*prevline != NULL) {</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="comment">// changed above</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// change colour</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  uppercolour = <a class="code" href="a01397.html#a29f11db4ed3af442549b1de233ac4739">FLIP_COLOUR</a>(uppercolour);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">if</span> (colour == prevcolour) {</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">if</span> (colour == uppercolour) {</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="comment">// finish a line</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="a01397.html#a6e23861c825d8a8e48c8b26d75e0b715">join_edges</a>(current, *prevline, free_cracks, outline_it);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  current = NULL; <span class="comment">// no edge now</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="comment">// new horiz edge</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  current = <a class="code" href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a>(uppercolour - colour, *prevline, &pos);</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  }</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  *prevline = NULL; <span class="comment">// no change this time</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">if</span> (colour == uppercolour)</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  *prevline = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(colour - prevcolour, *prevline, &pos);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="comment">// 8 vs 4 connection</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (colour == <a class="code" href="a01397.html#a5c91c3924c21f1e24a333317e8d08a74">WHITE_PIX</a>) {</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="a01397.html#a6e23861c825d8a8e48c8b26d75e0b715">join_edges</a>(current, *prevline, free_cracks, outline_it);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  current = <a class="code" href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a>(uppercolour - colour, NULL, &pos);</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  *prevline = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(colour - prevcolour, current, &pos);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  newcurrent = <a class="code" href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a>(uppercolour - colour, *prevline, &pos);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  *prevline = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(colour - prevcolour, current, &pos);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  current = newcurrent; <span class="comment">// right going h edge</span></div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  prevcolour = colour; <span class="comment">// remember new colour</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  }</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">if</span> (colour != prevcolour) {</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  *prevline = current = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(colour - prevcolour, current, &pos);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  prevcolour = colour;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  }</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">if</span> (colour != uppercolour)</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  current = <a class="code" href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a>(uppercolour - colour, current, &pos);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  current = NULL; <span class="comment">// no edge now</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  }</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  }</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span> (current != NULL) {</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// out of block</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">if</span> (*prevline != NULL) { <span class="comment">// got one to join to?</span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <a class="code" href="a01397.html#a6e23861c825d8a8e48c8b26d75e0b715">join_edges</a>(current, *prevline, free_cracks, outline_it);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  *prevline = NULL; <span class="comment">// tidy now</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">// fake vertical</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  *prevline = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(<a class="code" href="a01397.html#a29f11db4ed3af442549b1de233ac4739">FLIP_COLOUR</a>(prevcolour)-prevcolour, current, &pos);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  }</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*prevline != NULL) {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">//continue fake</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  *prevline = <a class="code" href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a>(<a class="code" href="a01397.html#a29f11db4ed3af442549b1de233ac4739">FLIP_COLOUR</a>(prevcolour)-prevcolour, *prevline, &pos);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  }</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> }</div><div class="ttc" id="a04789_html_a152fb63ed25f1545f1d10a1a80466bd4"><div class="ttname"><a href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">CrackPos::x</a></div><div class="ttdeci">int x</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00032">scanedg.h:32</a></div></div> <div class="ttc" id="a01397_html_a6e23861c825d8a8e48c8b26d75e0b715"><div class="ttname"><a href="a01397.html#a6e23861c825d8a8e48c8b26d75e0b715">join_edges</a></div><div class="ttdeci">void join_edges(CRACKEDGE *edge1, CRACKEDGE *edge2, CRACKEDGE **free_cracks, C_OUTLINE_IT *outline_it)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00331">scanedg.cpp:331</a></div></div> <div class="ttc" id="a01397_html_a9f6f7cf3af410407129ae07523fde0db"><div class="ttname"><a href="a01397.html#a9f6f7cf3af410407129ae07523fde0db">v_edge</a></div><div class="ttdeci">CRACKEDGE * v_edge(int sign, CRACKEDGE *join, CrackPos *pos)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00279">scanedg.cpp:279</a></div></div> <div class="ttc" id="a01397_html_a5c91c3924c21f1e24a333317e8d08a74"><div class="ttname"><a href="a01397.html#a5c91c3924c21f1e24a333317e8d08a74">WHITE_PIX</a></div><div class="ttdeci">#define WHITE_PIX</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00025">scanedg.cpp:25</a></div></div> <div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a01397_html_a06f8ee398cd3556fc0d40c5decd25745"><div class="ttname"><a href="a01397.html#a06f8ee398cd3556fc0d40c5decd25745">h_edge</a></div><div class="ttdeci">CRACKEDGE * h_edge(int sign, CRACKEDGE *join, CrackPos *pos)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00228">scanedg.cpp:228</a></div></div> <div class="ttc" id="a04789_html"><div class="ttname"><a href="a04789.html">CrackPos</a></div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00030">scanedg.h:30</a></div></div> <div class="ttc" id="a01397_html_a29f11db4ed3af442549b1de233ac4739"><div class="ttname"><a href="a01397.html#a29f11db4ed3af442549b1de233ac4739">FLIP_COLOUR</a></div><div class="ttdeci">#define FLIP_COLOUR(pix)</div><div class="ttdef"><b>Definition:</b> <a href="a01397_source.html#l00028">scanedg.cpp:28</a></div></div> </div><!-- fragment --> </div> </div> <a id="a7265d5ee56fbab9229a8f39e28d38458"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7265d5ee56fbab9229a8f39e28d38458">◆ </a></span>make_margins()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void make_margins </td> <td>(</td> <td class="paramtype"><a class="el" href="a02661.html">PDBLK</a> * </td> <td class="paramname"><em>block</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02669.html">BLOCK_LINE_IT</a> * </td> <td class="paramname"><em>line_it</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> * </td> <td class="paramname"><em>pixels</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a458fe97f82495945f8071bb3c18d1783">uinT8</a> </td> <td class="paramname"><em>margin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>left</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>right</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> </td> <td class="paramname"><em>y</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00086">86</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="a02689.html">PB_LINE_IT</a> *lines;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  ICOORDELT_LIST *segments; <span class="comment">//bits of a line</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  ICOORDELT_IT seg_it;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="a00524.html#aba1f582fd0168f3ff9225d8c90fa9eb8">inT32</a> start; <span class="comment">//of segment</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a> xext; <span class="comment">//of segment</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">int</span> xindex; <span class="comment">//index to pixel</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">if</span> (block-><a class="code" href="a02661.html#a87856f8400f0629dc761fec0f7a17b57">poly_block</a> () != NULL) {</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  lines = <span class="keyword">new</span> <a class="code" href="a02689.html">PB_LINE_IT</a> (block-><a class="code" href="a02661.html#a87856f8400f0629dc761fec0f7a17b57">poly_block</a> ());</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  segments = lines-><a class="code" href="a02689.html#a951f496eedaed0deb3e61946f7444122">get_line</a> (y);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">if</span> (!segments->empty ()) {</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  seg_it.set_to_list (segments);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  seg_it.mark_cycle_pt ();</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  start = seg_it.data ()->x ();</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  xext = seg_it.data ()->y ();</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">for</span> (xindex = left; xindex < right; xindex++) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">if</span> (xindex >= start && !seg_it.cycled_list ()) {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  xindex = start + xext - 1;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  seg_it.forward ();</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  start = seg_it.data ()->x ();</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  xext = seg_it.data ()->y ();</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  pixels[xindex - left] = margin;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">for</span> (xindex = left; xindex < right; xindex++)</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  pixels[xindex - left] = margin;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keyword">delete</span> segments;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keyword">delete</span> lines;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  start = line_it-><a class="code" href="a02669.html#acb41ad4c1ece0af796b3551d5ad6dd8c">get_line</a> (y, xext);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">for</span> (xindex = left; xindex < start; xindex++)</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  pixels[xindex - left] = margin;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">for</span> (xindex = start + xext; xindex < right; xindex++)</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  pixels[xindex - left] = margin;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> }</div><div class="ttc" id="a00524_html_a8d41499d38c24d39b221ab0c158fe5a8"><div class="ttname"><a href="a00524.html#a8d41499d38c24d39b221ab0c158fe5a8">inT16</a></div><div class="ttdeci">short inT16</div><div class="ttdef"><b>Definition:</b> <a href="a00524_source.html#l00033">host.h:33</a></div></div> <div class="ttc" id="a02669_html_acb41ad4c1ece0af796b3551d5ad6dd8c"><div class="ttname"><a href="a02669.html#acb41ad4c1ece0af796b3551d5ad6dd8c">BLOCK_LINE_IT::get_line</a></div><div class="ttdeci">inT16 get_line(inT16 y, inT16 &xext)</div><div class="ttdef"><b>Definition:</b> <a href="a00347_source.html#l00344">pdblock.cpp:344</a></div></div> <div class="ttc" id="a02661_html_a87856f8400f0629dc761fec0f7a17b57"><div class="ttname"><a href="a02661.html#a87856f8400f0629dc761fec0f7a17b57">PDBLK::poly_block</a></div><div class="ttdeci">POLY_BLOCK * poly_block() const</div><div class="ttdef"><b>Definition:</b> <a href="a00350_source.html#l00055">pdblock.h:55</a></div></div> <div class="ttc" id="a02689_html_a951f496eedaed0deb3e61946f7444122"><div class="ttname"><a href="a02689.html#a951f496eedaed0deb3e61946f7444122">PB_LINE_IT::get_line</a></div><div class="ttdeci">ICOORDELT_LIST * get_line(inT16 y)</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00343">polyblk.cpp:343</a></div></div> <div class="ttc" id="a00524_html_aba1f582fd0168f3ff9225d8c90fa9eb8"><div class="ttname"><a href="a00524.html#aba1f582fd0168f3ff9225d8c90fa9eb8">inT32</a></div><div class="ttdeci">int inT32</div><div class="ttdef"><b>Definition:</b> <a href="a00524_source.html#l00035">host.h:35</a></div></div> <div class="ttc" id="a02689_html"><div class="ttname"><a href="a02689.html">PB_LINE_IT</a></div><div class="ttdef"><b>Definition:</b> <a href="a00368_source.html#l00094">polyblk.h:94</a></div></div> </div><!-- fragment --> </div> </div> <a id="a9f6f7cf3af410407129ae07523fde0db"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9f6f7cf3af410407129ae07523fde0db">◆ </a></span>v_edge()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a02529.html">CRACKEDGE</a>* v_edge </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>sign</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a02529.html">CRACKEDGE</a> * </td> <td class="paramname"><em>join</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a04789.html">CrackPos</a> * </td> <td class="paramname"><em>pos</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="a01397_source.html#l00279">279</a> of file <a class="el" href="a01397_source.html">scanedg.cpp</a>.</p> <div class="fragment"><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  {</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <a class="code" href="a02529.html">CRACKEDGE</a> *newpt; <span class="comment">// return value</span></div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordflow">if</span> (*pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a> != NULL) {</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  newpt = *pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a>;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  *pos-><a class="code" href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">free_cracks</a> = newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>; <span class="comment">// get one fast</span></div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  newpt = <span class="keyword">new</span> <a class="code" href="a02529.html">CRACKEDGE</a>;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  }</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a94c586039b3a003b35cf659b33b938f3">set_x</a>(pos-><a class="code" href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">x</a>); <span class="comment">// coords of pt</span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  newpt-><a class="code" href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">stepx</a> = 0; <span class="comment">// edge is vertical</span></div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> </div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">if</span> (sign > 0) {</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#aa9fb418d1c602c0533e426759da43d67">set_y</a>(pos-><a class="code" href="a04789.html#a71d7e214daf3a1ce26ee03037a0f0caf">y</a>); <span class="comment">// start location</span></div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  newpt-><a class="code" href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">stepy</a> = 1;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  newpt-><a class="code" href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">stepdir</a> = 3;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#aa9fb418d1c602c0533e426759da43d67">set_y</a>(pos-><a class="code" href="a04789.html#a71d7e214daf3a1ce26ee03037a0f0caf">y</a> + 1); <span class="comment">// start location</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  newpt-><a class="code" href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">stepy</a> = -1;</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  newpt-><a class="code" href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">stepdir</a> = 1;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  }</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> </div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keywordflow">if</span> (<a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a> == NULL) {</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = newpt; <span class="comment">//ptrs to other ends</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = newpt;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">x</a>() == <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->pos.x()</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  && newpt-><a class="code" href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">pos</a>.<a class="code" href="a02673.html#a89a73d28596830e7a72164f87fa5805d">y</a>() + newpt-><a class="code" href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">stepy</a> == <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->pos.y()) {</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->prev; <span class="comment">// update other ends</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a>-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = newpt;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>; <span class="comment">// join up</span></div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>->prev = newpt;</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>-><a class="code" href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">next</a>; <span class="comment">// update other ends</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  newpt-><a class="code" href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">next</a>-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = newpt;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  newpt-><a class="code" href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">prev</a> = <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>; <span class="comment">// join up</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <a class="code" href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a>-><a class="code" href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">next</a> = newpt;</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  }</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <span class="keywordflow">return</span> newpt;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> }</div><div class="ttc" id="a02529_html_a907cb1dc30d54151b7bd96a8ab90f207"><div class="ttname"><a href="a02529.html#a907cb1dc30d54151b7bd96a8ab90f207">CRACKEDGE::stepx</a></div><div class="ttdeci">inT8 stepx</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00031">crakedge.h:31</a></div></div> <div class="ttc" id="a04789_html_a152fb63ed25f1545f1d10a1a80466bd4"><div class="ttname"><a href="a04789.html#a152fb63ed25f1545f1d10a1a80466bd4">CrackPos::x</a></div><div class="ttdeci">int x</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00032">scanedg.h:32</a></div></div> <div class="ttc" id="a02529_html_a9d7eda07653a7c0831d92630a1668dc3"><div class="ttname"><a href="a02529.html#a9d7eda07653a7c0831d92630a1668dc3">CRACKEDGE::stepdir</a></div><div class="ttdeci">inT8 stepdir</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00033">crakedge.h:33</a></div></div> <div class="ttc" id="a04789_html_ad0f5bf625d55d94e09e5a5f4e920461e"><div class="ttname"><a href="a04789.html#ad0f5bf625d55d94e09e5a5f4e920461e">CrackPos::free_cracks</a></div><div class="ttdeci">CRACKEDGE ** free_cracks</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00031">scanedg.h:31</a></div></div> <div class="ttc" id="a01121_html_a185e827874145ed10ce9db702a34f671"><div class="ttname"><a href="a01121.html#a185e827874145ed10ce9db702a34f671">join</a></div><div class="ttdeci">LIST join(LIST list1, LIST list2)</div><div class="ttdef"><b>Definition:</b> <a href="a01121_source.html#l00258">oldlist.cpp:258</a></div></div> <div class="ttc" id="a02529_html_ae7bcdb1f6f28f612a0ff4ace03b38165"><div class="ttname"><a href="a02529.html#ae7bcdb1f6f28f612a0ff4ace03b38165">CRACKEDGE::pos</a></div><div class="ttdeci">ICOORD pos</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00030">crakedge.h:30</a></div></div> <div class="ttc" id="a02673_html_afa32b2bf89dd489bf4fd168bdd01742c"><div class="ttname"><a href="a02673.html#afa32b2bf89dd489bf4fd168bdd01742c">ICOORD::x</a></div><div class="ttdeci">inT16 x() const</div><div class="ttdoc">access function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00052">points.h:52</a></div></div> <div class="ttc" id="a02529_html"><div class="ttname"><a href="a02529.html">CRACKEDGE</a></div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00026">crakedge.h:26</a></div></div> <div class="ttc" id="a02529_html_a25eed9381f5de431869fd4d61fdbd15d"><div class="ttname"><a href="a02529.html#a25eed9381f5de431869fd4d61fdbd15d">CRACKEDGE::stepy</a></div><div class="ttdeci">inT8 stepy</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00032">crakedge.h:32</a></div></div> <div class="ttc" id="a02529_html_a65662bdae2f4b5a3b670791fa6d6d44a"><div class="ttname"><a href="a02529.html#a65662bdae2f4b5a3b670791fa6d6d44a">CRACKEDGE::next</a></div><div class="ttdeci">CRACKEDGE * next</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00035">crakedge.h:35</a></div></div> <div class="ttc" id="a04517_html_af4f6ed22cbbd6d68b0bc4505defed426"><div class="ttname"><a href="a04517.html#af4f6ed22cbbd6d68b0bc4505defed426">list_rec::next</a></div><div class="ttdeci">struct list_rec * next</div><div class="ttdef"><b>Definition:</b> <a href="a01124_source.html#l00130">oldlist.h:130</a></div></div> <div class="ttc" id="a02673_html_aa9fb418d1c602c0533e426759da43d67"><div class="ttname"><a href="a02673.html#aa9fb418d1c602c0533e426759da43d67">ICOORD::set_y</a></div><div class="ttdeci">void set_y(inT16 yin)</div><div class="ttdoc">rewrite function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00065">points.h:65</a></div></div> <div class="ttc" id="a02673_html_a94c586039b3a003b35cf659b33b938f3"><div class="ttname"><a href="a02673.html#a94c586039b3a003b35cf659b33b938f3">ICOORD::set_x</a></div><div class="ttdeci">void set_x(inT16 xin)</div><div class="ttdoc">rewrite function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00061">points.h:61</a></div></div> <div class="ttc" id="a02529_html_a22411a30eb2b7529ccb755dc3971b0d1"><div class="ttname"><a href="a02529.html#a22411a30eb2b7529ccb755dc3971b0d1">CRACKEDGE::prev</a></div><div class="ttdeci">CRACKEDGE * prev</div><div class="ttdef"><b>Definition:</b> <a href="a00248_source.html#l00034">crakedge.h:34</a></div></div> <div class="ttc" id="a04789_html_a71d7e214daf3a1ce26ee03037a0f0caf"><div class="ttname"><a href="a04789.html#a71d7e214daf3a1ce26ee03037a0f0caf">CrackPos::y</a></div><div class="ttdeci">int y</div><div class="ttdef"><b>Definition:</b> <a href="a01400_source.html#l00033">scanedg.h:33</a></div></div> <div class="ttc" id="a02673_html_a89a73d28596830e7a72164f87fa5805d"><div class="ttname"><a href="a02673.html#a89a73d28596830e7a72164f87fa5805d">ICOORD::y</a></div><div class="ttdeci">inT16 y() const</div><div class="ttdoc">access_function </div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00056">points.h:56</a></div></div> </div><!-- fragment --> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_9755ee342a92885af0731133719bff63.html">textord</a></li><li class="navelem"><a class="el" href="a01397.html">scanedg.cpp</a></li> <li class="footer">Generated on Mon Oct 29 2018 11:27:54 for tesseract by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li> </ul> </div> </body> </html>