Terminal.Gui.Graphs.TextAnnotation.html 18 KB

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