Terminal.Gui.Graphs.LineCanvas.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class LineCanvas
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class LineCanvas
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Graphs.LineCanvas">
  72. <h1 id="Terminal_Gui_Graphs_LineCanvas" data-uid="Terminal.Gui.Graphs.LineCanvas" class="text-break">Class LineCanvas
  73. </h1>
  74. <div class="markdown level0 summary">Facilitates box drawing and line intersection detection
  75. and rendering. Does not support diagonal lines.</div>
  76. <div class="markdown level0 conceptual"></div>
  77. <div class="inheritance">
  78. <h5>Inheritance</h5>
  79. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  80. <div class="level1"><span class="xref">LineCanvas</span></div>
  81. </div>
  82. <div class="inheritedMembers">
  83. <h5>Inherited Members</h5>
  84. <div>
  85. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  86. </div>
  87. <div>
  88. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
  89. </div>
  90. <div>
  91. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  92. </div>
  93. <div>
  94. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  104. </div>
  105. </div>
  106. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a>.<a class="xref" href="Terminal.Gui.Graphs.html">Graphs</a></h6>
  107. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  108. <h5 id="Terminal_Gui_Graphs_LineCanvas_syntax">Syntax</h5>
  109. <div class="codewrapper">
  110. <pre><code class="lang-csharp hljs">public class LineCanvas</code></pre>
  111. </div>
  112. <h3 id="methods">Methods
  113. </h3>
  114. <span class="small pull-right mobile-hide">
  115. <span class="divider">|</span>
  116. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LineCanvas_AddLine_Terminal_Gui_Point_System_Int32_Terminal_Gui_Graphs_Orientation_Terminal_Gui_BorderStyle_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LineCanvas.AddLine(Terminal.Gui.Point%2CSystem.Int32%2CTerminal.Gui.Graphs.Orientation%2CTerminal.Gui.BorderStyle)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  117. </span>
  118. <span class="small pull-right mobile-hide">
  119. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/LineCanvas.cs/#L45">View Source</a>
  120. </span>
  121. <a id="Terminal_Gui_Graphs_LineCanvas_AddLine_" data-uid="Terminal.Gui.Graphs.LineCanvas.AddLine*"></a>
  122. <h4 id="Terminal_Gui_Graphs_LineCanvas_AddLine_Terminal_Gui_Point_System_Int32_Terminal_Gui_Graphs_Orientation_Terminal_Gui_BorderStyle_" data-uid="Terminal.Gui.Graphs.LineCanvas.AddLine(Terminal.Gui.Point,System.Int32,Terminal.Gui.Graphs.Orientation,Terminal.Gui.BorderStyle)">AddLine(Point, int, Orientation, BorderStyle)</h4>
  123. <div class="markdown level1 summary">Add a new line to the canvas starting at <code class="paramref">from</code>.
  124. Use positive <code class="paramref">length</code> for Right and negative for Left
  125. when <a class="xref" href="Terminal.Gui.Graphs.Orientation.html">Orientation</a> is <a class="xref" href="Terminal.Gui.Graphs.Orientation.html#Terminal_Gui_Graphs_Orientation_Horizontal">Horizontal</a>.
  126. Use positive <code class="paramref">length</code> for Down and negative for Up
  127. when <a class="xref" href="Terminal.Gui.Graphs.Orientation.html">Orientation</a> is <a class="xref" href="Terminal.Gui.Graphs.Orientation.html#Terminal_Gui_Graphs_Orientation_Vertical">Vertical</a>.</div>
  128. <div class="markdown level1 conceptual"></div>
  129. <h5 class="declaration">Declaration</h5>
  130. <div class="codewrapper">
  131. <pre><code class="lang-csharp hljs">public void AddLine(Point from, int length, Orientation orientation, BorderStyle style)</code></pre>
  132. </div>
  133. <h5 class="parameters">Parameters</h5>
  134. <table class="table table-bordered table-condensed">
  135. <thead>
  136. <tr>
  137. <th>Type</th>
  138. <th>Name</th>
  139. <th>Description</th>
  140. </tr>
  141. </thead>
  142. <tbody>
  143. <tr>
  144. <td><a class="xref" href="Terminal.Gui.Point.html">Point</a></td>
  145. <td><span class="parametername">from</span></td>
  146. <td>Starting point.</td>
  147. </tr>
  148. <tr>
  149. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
  150. <td><span class="parametername">length</span></td>
  151. <td>Length of line. 0 for a dot.
  152. Positive for Down/Right. Negative for Up/Left.</td>
  153. </tr>
  154. <tr>
  155. <td><a class="xref" href="Terminal.Gui.Graphs.Orientation.html">Orientation</a></td>
  156. <td><span class="parametername">orientation</span></td>
  157. <td>Direction of the line.</td>
  158. </tr>
  159. <tr>
  160. <td><a class="xref" href="Terminal.Gui.BorderStyle.html">BorderStyle</a></td>
  161. <td><span class="parametername">style</span></td>
  162. <td>The style of line to use</td>
  163. </tr>
  164. </tbody>
  165. </table>
  166. <span class="small pull-right mobile-hide">
  167. <span class="divider">|</span>
  168. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LineCanvas_GenerateImage_Terminal_Gui_Rect_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LineCanvas.GenerateImage(Terminal.Gui.Rect)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  169. </span>
  170. <span class="small pull-right mobile-hide">
  171. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/LineCanvas.cs/#L60">View Source</a>
  172. </span>
  173. <a id="Terminal_Gui_Graphs_LineCanvas_GenerateImage_" data-uid="Terminal.Gui.Graphs.LineCanvas.GenerateImage*"></a>
  174. <h4 id="Terminal_Gui_Graphs_LineCanvas_GenerateImage_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Graphs.LineCanvas.GenerateImage(Terminal.Gui.Rect)">GenerateImage(Rect)</h4>
  175. <div class="markdown level1 summary">Evaluate all currently defined lines that lie within
  176. <code class="paramref">inArea</code> and map that
  177. shows what characters (if any) should be rendered at each
  178. point so that all lines connect up correctly with appropriate
  179. intersection symbols.
  180. <returns></returns></div>
  181. <div class="markdown level1 conceptual"></div>
  182. <h5 class="declaration">Declaration</h5>
  183. <div class="codewrapper">
  184. <pre><code class="lang-csharp hljs">public Dictionary&lt;Point, Rune&gt; GenerateImage(Rect inArea)</code></pre>
  185. </div>
  186. <h5 class="parameters">Parameters</h5>
  187. <table class="table table-bordered table-condensed">
  188. <thead>
  189. <tr>
  190. <th>Type</th>
  191. <th>Name</th>
  192. <th>Description</th>
  193. </tr>
  194. </thead>
  195. <tbody>
  196. <tr>
  197. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  198. <td><span class="parametername">inArea</span></td>
  199. <td></td>
  200. </tr>
  201. </tbody>
  202. </table>
  203. <h5 class="returns">Returns</h5>
  204. <table class="table table-bordered table-condensed">
  205. <thead>
  206. <tr>
  207. <th>Type</th>
  208. <th>Description</th>
  209. </tr>
  210. </thead>
  211. <tbody>
  212. <tr>
  213. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="Terminal.Gui.Point.html">Point</a>, <span class="xref">Rune</span>&gt;</td>
  214. <td>Mapping of all the points within <code class="paramref">inArea</code> to
  215. line or intersection runes which should be drawn there.</td>
  216. </tr>
  217. </tbody>
  218. </table>
  219. </article>
  220. </div>
  221. <div class="hidden-sm col-md-2" role="complementary">
  222. <div class="sideaffix">
  223. <div class="contribution">
  224. <ul class="nav">
  225. <li>
  226. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LineCanvas.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LineCanvas%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  227. </li>
  228. <li>
  229. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/LineCanvas.cs/#L12" class="contribution-link">View Source</a>
  230. </li>
  231. </ul>
  232. </div>
  233. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  234. <h5>In this article</h5>
  235. <div></div>
  236. </nav>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. <footer>
  242. <div class="grad-bottom"></div>
  243. <div class="footer">
  244. <div class="container">
  245. <span class="pull-right">
  246. <a href="#top">Back to top</a>
  247. </span>
  248. <span>Generated by <strong>DocFX</strong></span>
  249. </div>
  250. </div>
  251. </footer>
  252. </div>
  253. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  254. <script type="text/javascript" src="../../styles/docfx.js"></script>
  255. <script type="text/javascript" src="../../styles/main.js"></script>
  256. </body>
  257. </html>