Terminal.Gui.Graphs.LineCanvas.html 13 KB

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