Terminal.Gui.Graphs.TextAnnotation.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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 TextAnnotation
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class TextAnnotation
  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.TextAnnotation">
  72. <h1 id="Terminal_Gui_Graphs_TextAnnotation" data-uid="Terminal.Gui.Graphs.TextAnnotation" class="text-break">Class TextAnnotation
  73. </h1>
  74. <div class="markdown level0 summary">Displays text at a given position (in screen space or graph space)</div>
  75. <div class="markdown level0 conceptual"></div>
  76. <div class="inheritance">
  77. <h5>Inheritance</h5>
  78. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  79. <div class="level1"><span class="xref">TextAnnotation</span></div>
  80. </div>
  81. <div class="implements">
  82. <h5>Implements</h5>
  83. <div><a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  89. </div>
  90. <div>
  91. <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>
  92. </div>
  93. <div>
  94. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  95. </div>
  96. <div>
  97. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  98. </div>
  99. <div>
  100. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  101. </div>
  102. <div>
  103. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  104. </div>
  105. <div>
  106. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  107. </div>
  108. </div>
  109. <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>
  110. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  111. <h5 id="Terminal_Gui_Graphs_TextAnnotation_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public class TextAnnotation : IAnnotation</code></pre>
  114. </div>
  115. <h3 id="properties">Properties
  116. </h3>
  117. <span class="small pull-right mobile-hide">
  118. <span class="divider">|</span>
  119. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_BeforeSeries.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.BeforeSeries%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>
  120. </span>
  121. <span class="small pull-right mobile-hide">
  122. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L62">View Source</a>
  123. </span>
  124. <a id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries_" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries*"></a>
  125. <h4 id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries">BeforeSeries</h4>
  126. <div class="markdown level1 summary">True to add text before plotting series. Defaults to false</div>
  127. <div class="markdown level1 conceptual"></div>
  128. <h5 class="declaration">Declaration</h5>
  129. <div class="codewrapper">
  130. <pre><code class="lang-csharp hljs">public bool BeforeSeries { get; set; }</code></pre>
  131. </div>
  132. <h5 class="propertyValue">Property Value</h5>
  133. <table class="table table-bordered table-condensed">
  134. <thead>
  135. <tr>
  136. <th>Type</th>
  137. <th>Description</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <tr>
  142. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  143. <td></td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. <span class="small pull-right mobile-hide">
  148. <span class="divider">|</span>
  149. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_GraphPosition.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.GraphPosition%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>
  150. </span>
  151. <span class="small pull-right mobile-hide">
  152. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L52">View Source</a>
  153. </span>
  154. <a id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition*"></a>
  155. <h4 id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition">GraphPosition</h4>
  156. <div class="markdown level1 summary">The location in graph space to draw the <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_Text">Text</a>. This
  157. annotation will only show if the point is in the current viewable
  158. area of the graph presented in the <a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></div>
  159. <div class="markdown level1 conceptual"></div>
  160. <h5 class="declaration">Declaration</h5>
  161. <div class="codewrapper">
  162. <pre><code class="lang-csharp hljs">public PointF GraphPosition { get; set; }</code></pre>
  163. </div>
  164. <h5 class="propertyValue">Property Value</h5>
  165. <table class="table table-bordered table-condensed">
  166. <thead>
  167. <tr>
  168. <th>Type</th>
  169. <th>Description</th>
  170. </tr>
  171. </thead>
  172. <tbody>
  173. <tr>
  174. <td><a class="xref" href="Terminal.Gui.PointF.html">PointF</a></td>
  175. <td></td>
  176. </tr>
  177. </tbody>
  178. </table>
  179. <span class="small pull-right mobile-hide">
  180. <span class="divider">|</span>
  181. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_ScreenPosition.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.ScreenPosition%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>
  182. </span>
  183. <span class="small pull-right mobile-hide">
  184. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L45">View Source</a>
  185. </span>
  186. <a id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition*"></a>
  187. <h4 id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition">ScreenPosition</h4>
  188. <div class="markdown level1 summary">The location on screen to draw the <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_Text">Text</a> regardless
  189. of scroll/zoom settings. This overrides <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_GraphPosition">GraphPosition</a>
  190. if specified.</div>
  191. <div class="markdown level1 conceptual"></div>
  192. <h5 class="declaration">Declaration</h5>
  193. <div class="codewrapper">
  194. <pre><code class="lang-csharp hljs">public Point? ScreenPosition { get; set; }</code></pre>
  195. </div>
  196. <h5 class="propertyValue">Property Value</h5>
  197. <table class="table table-bordered table-condensed">
  198. <thead>
  199. <tr>
  200. <th>Type</th>
  201. <th>Description</th>
  202. </tr>
  203. </thead>
  204. <tbody>
  205. <tr>
  206. <td><a class="xref" href="Terminal.Gui.Point.html">Point</a>?</td>
  207. <td></td>
  208. </tr>
  209. </tbody>
  210. </table>
  211. <span class="small pull-right mobile-hide">
  212. <span class="divider">|</span>
  213. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_Text.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.Text%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>
  214. </span>
  215. <span class="small pull-right mobile-hide">
  216. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L57">View Source</a>
  217. </span>
  218. <a id="Terminal_Gui_Graphs_TextAnnotation_Text_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text*"></a>
  219. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Text" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text">Text</h4>
  220. <div class="markdown level1 summary">Text to display on the graph</div>
  221. <div class="markdown level1 conceptual"></div>
  222. <h5 class="declaration">Declaration</h5>
  223. <div class="codewrapper">
  224. <pre><code class="lang-csharp hljs">public string Text { get; set; }</code></pre>
  225. </div>
  226. <h5 class="propertyValue">Property Value</h5>
  227. <table class="table table-bordered table-condensed">
  228. <thead>
  229. <tr>
  230. <th>Type</th>
  231. <th>Description</th>
  232. </tr>
  233. </thead>
  234. <tbody>
  235. <tr>
  236. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  237. <td></td>
  238. </tr>
  239. </tbody>
  240. </table>
  241. <h3 id="methods">Methods
  242. </h3>
  243. <span class="small pull-right mobile-hide">
  244. <span class="divider">|</span>
  245. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_DrawText_Terminal_Gui_GraphView_System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.DrawText(Terminal.Gui.GraphView%2CSystem.Int32%2CSystem.Int32)%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>
  246. </span>
  247. <span class="small pull-right mobile-hide">
  248. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L86">View Source</a>
  249. </span>
  250. <a id="Terminal_Gui_Graphs_TextAnnotation_DrawText_" data-uid="Terminal.Gui.Graphs.TextAnnotation.DrawText*"></a>
  251. <h4 id="Terminal_Gui_Graphs_TextAnnotation_DrawText_Terminal_Gui_GraphView_System_Int32_System_Int32_" data-uid="Terminal.Gui.Graphs.TextAnnotation.DrawText(Terminal.Gui.GraphView,System.Int32,System.Int32)">DrawText(GraphView, int, int)</h4>
  252. <div class="markdown level1 summary">Draws the <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_Text">Text</a> at the given coordinates with truncation to avoid
  253. spilling over <see name="View.Bounds"></see> of the <code class="paramref">graph</code></div>
  254. <div class="markdown level1 conceptual"></div>
  255. <h5 class="declaration">Declaration</h5>
  256. <div class="codewrapper">
  257. <pre><code class="lang-csharp hljs">protected void DrawText(GraphView graph, int x, int y)</code></pre>
  258. </div>
  259. <h5 class="parameters">Parameters</h5>
  260. <table class="table table-bordered table-condensed">
  261. <thead>
  262. <tr>
  263. <th>Type</th>
  264. <th>Name</th>
  265. <th>Description</th>
  266. </tr>
  267. </thead>
  268. <tbody>
  269. <tr>
  270. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  271. <td><span class="parametername">graph</span></td>
  272. <td></td>
  273. </tr>
  274. <tr>
  275. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
  276. <td><span class="parametername">x</span></td>
  277. <td>Screen x position to start drawing string</td>
  278. </tr>
  279. <tr>
  280. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
  281. <td><span class="parametername">y</span></td>
  282. <td>Screen y position to start drawing string</td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <span class="small pull-right mobile-hide">
  287. <span class="divider">|</span>
  288. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation_Render_Terminal_Gui_GraphView_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation.Render(Terminal.Gui.GraphView)%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>
  289. </span>
  290. <span class="small pull-right mobile-hide">
  291. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L68">View Source</a>
  292. </span>
  293. <a id="Terminal_Gui_Graphs_TextAnnotation_Render_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render*"></a>
  294. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Render_Terminal_Gui_GraphView_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render(Terminal.Gui.GraphView)">Render(GraphView)</h4>
  295. <div class="markdown level1 summary">Draws the annotation</div>
  296. <div class="markdown level1 conceptual"></div>
  297. <h5 class="declaration">Declaration</h5>
  298. <div class="codewrapper">
  299. <pre><code class="lang-csharp hljs">public void Render(GraphView graph)</code></pre>
  300. </div>
  301. <h5 class="parameters">Parameters</h5>
  302. <table class="table table-bordered table-condensed">
  303. <thead>
  304. <tr>
  305. <th>Type</th>
  306. <th>Name</th>
  307. <th>Description</th>
  308. </tr>
  309. </thead>
  310. <tbody>
  311. <tr>
  312. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  313. <td><span class="parametername">graph</span></td>
  314. <td></td>
  315. </tr>
  316. </tbody>
  317. </table>
  318. <h3 id="implements">Implements</h3>
  319. <div>
  320. <a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a>
  321. </div>
  322. </article>
  323. </div>
  324. <div class="hidden-sm col-md-2" role="complementary">
  325. <div class="sideaffix">
  326. <div class="contribution">
  327. <ul class="nav">
  328. <li>
  329. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_TextAnnotation.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.TextAnnotation%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>
  330. </li>
  331. <li>
  332. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L38" class="contribution-link">View Source</a>
  333. </li>
  334. </ul>
  335. </div>
  336. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  337. <h5>In this article</h5>
  338. <div></div>
  339. </nav>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. <footer>
  345. <div class="grad-bottom"></div>
  346. <div class="footer">
  347. <div class="container">
  348. <span class="pull-right">
  349. <a href="#top">Back to top</a>
  350. </span>
  351. <span>Generated by <strong>DocFX</strong></span>
  352. </div>
  353. </div>
  354. </footer>
  355. </div>
  356. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  357. <script type="text/javascript" src="../../styles/docfx.js"></script>
  358. <script type="text/javascript" src="../../styles/main.js"></script>
  359. </body>
  360. </html>