Terminal.Gui.Graphs.TextAnnotation.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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.0.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. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Graphs.TextAnnotation">
  73. <h1 id="Terminal_Gui_Graphs_TextAnnotation" data-uid="Terminal.Gui.Graphs.TextAnnotation" class="text-break">Class TextAnnotation
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Displays text at a given position (in screen space or graph space)
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><span class="xref">System.Object</span></div>
  82. <div class="level1"><span class="xref">TextAnnotation</span></div>
  83. </div>
  84. <div classs="implements">
  85. <h5>Implements</h5>
  86. <div><a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a></div>
  87. </div>
  88. <div class="inheritedMembers">
  89. <h5>Inherited Members</h5>
  90. <div>
  91. <span class="xref">System.Object.Equals(System.Object)</span>
  92. </div>
  93. <div>
  94. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.GetHashCode()</span>
  98. </div>
  99. <div>
  100. <span class="xref">System.Object.GetType()</span>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.MemberwiseClone()</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  107. </div>
  108. <div>
  109. <span class="xref">System.Object.ToString()</span>
  110. </div>
  111. </div>
  112. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.Graphs.html">Terminal.Gui.Graphs</a></h6>
  113. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  114. <h5 id="Terminal_Gui_Graphs_TextAnnotation_syntax">Syntax</h5>
  115. <div class="codewrapper">
  116. <pre><code class="lang-csharp hljs">public class TextAnnotation : IAnnotation</code></pre>
  117. </div>
  118. <h3 id="properties">Properties
  119. </h3>
  120. <a id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries_" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries*"></a>
  121. <h4 id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries">BeforeSeries</h4>
  122. <div class="markdown level1 summary">
  123. True to add text before plotting series. Defaults to false
  124. </div>
  125. <div class="markdown level1 conceptual"></div>
  126. <h5 class="decalaration">Declaration</h5>
  127. <div class="codewrapper">
  128. <pre><code class="lang-csharp hljs">public bool BeforeSeries { get; set; }</code></pre>
  129. </div>
  130. <h5 class="propertyValue">Property Value</h5>
  131. <table class="table table-bordered table-striped table-condensed">
  132. <thead>
  133. <tr>
  134. <th>Type</th>
  135. <th>Description</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <tr>
  140. <td><span class="xref">System.Boolean</span></td>
  141. <td></td>
  142. </tr>
  143. </tbody>
  144. </table>
  145. <a id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition*"></a>
  146. <h4 id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition">GraphPosition</h4>
  147. <div class="markdown level1 summary">
  148. 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
  149. annotation will only show if the point is in the current viewable
  150. area of the graph presented in the <a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a>
  151. </div>
  152. <div class="markdown level1 conceptual"></div>
  153. <h5 class="decalaration">Declaration</h5>
  154. <div class="codewrapper">
  155. <pre><code class="lang-csharp hljs">public PointF GraphPosition { get; set; }</code></pre>
  156. </div>
  157. <h5 class="propertyValue">Property Value</h5>
  158. <table class="table table-bordered table-striped table-condensed">
  159. <thead>
  160. <tr>
  161. <th>Type</th>
  162. <th>Description</th>
  163. </tr>
  164. </thead>
  165. <tbody>
  166. <tr>
  167. <td><a class="xref" href="Terminal.Gui.PointF.html">PointF</a></td>
  168. <td></td>
  169. </tr>
  170. </tbody>
  171. </table>
  172. <a id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition*"></a>
  173. <h4 id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition">ScreenPosition</h4>
  174. <div class="markdown level1 summary">
  175. The location on screen to draw the <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_Text">Text</a> regardless
  176. of scroll/zoom settings. This overrides <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_GraphPosition">GraphPosition</a>
  177. if specified.
  178. </div>
  179. <div class="markdown level1 conceptual"></div>
  180. <h5 class="decalaration">Declaration</h5>
  181. <div class="codewrapper">
  182. <pre><code class="lang-csharp hljs">public Point? ScreenPosition { get; set; }</code></pre>
  183. </div>
  184. <h5 class="propertyValue">Property Value</h5>
  185. <table class="table table-bordered table-striped table-condensed">
  186. <thead>
  187. <tr>
  188. <th>Type</th>
  189. <th>Description</th>
  190. </tr>
  191. </thead>
  192. <tbody>
  193. <tr>
  194. <td><span class="xref">System.Nullable</span>&lt;<a class="xref" href="Terminal.Gui.Point.html">Point</a>&gt;</td>
  195. <td></td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. <a id="Terminal_Gui_Graphs_TextAnnotation_Text_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text*"></a>
  200. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Text" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text">Text</h4>
  201. <div class="markdown level1 summary">
  202. Text to display on the graph
  203. </div>
  204. <div class="markdown level1 conceptual"></div>
  205. <h5 class="decalaration">Declaration</h5>
  206. <div class="codewrapper">
  207. <pre><code class="lang-csharp hljs">public string Text { get; set; }</code></pre>
  208. </div>
  209. <h5 class="propertyValue">Property Value</h5>
  210. <table class="table table-bordered table-striped table-condensed">
  211. <thead>
  212. <tr>
  213. <th>Type</th>
  214. <th>Description</th>
  215. </tr>
  216. </thead>
  217. <tbody>
  218. <tr>
  219. <td><span class="xref">System.String</span></td>
  220. <td></td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. <h3 id="methods">Methods
  225. </h3>
  226. <a id="Terminal_Gui_Graphs_TextAnnotation_DrawText_" data-uid="Terminal.Gui.Graphs.TextAnnotation.DrawText*"></a>
  227. <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>
  228. <div class="markdown level1 summary">
  229. 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
  230. spilling over <see name="View.Bounds"></see> of the <code data-dev-comment-type="paramref" class="paramref">graph</code>
  231. </div>
  232. <div class="markdown level1 conceptual"></div>
  233. <h5 class="decalaration">Declaration</h5>
  234. <div class="codewrapper">
  235. <pre><code class="lang-csharp hljs">protected void DrawText(GraphView graph, int x, int y)</code></pre>
  236. </div>
  237. <h5 class="parameters">Parameters</h5>
  238. <table class="table table-bordered table-striped table-condensed">
  239. <thead>
  240. <tr>
  241. <th>Type</th>
  242. <th>Name</th>
  243. <th>Description</th>
  244. </tr>
  245. </thead>
  246. <tbody>
  247. <tr>
  248. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  249. <td><span class="parametername">graph</span></td>
  250. <td></td>
  251. </tr>
  252. <tr>
  253. <td><span class="xref">System.Int32</span></td>
  254. <td><span class="parametername">x</span></td>
  255. <td>Screen x position to start drawing string</td>
  256. </tr>
  257. <tr>
  258. <td><span class="xref">System.Int32</span></td>
  259. <td><span class="parametername">y</span></td>
  260. <td>Screen y position to start drawing string</td>
  261. </tr>
  262. </tbody>
  263. </table>
  264. <a id="Terminal_Gui_Graphs_TextAnnotation_Render_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render*"></a>
  265. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Render_Terminal_Gui_GraphView_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render(Terminal.Gui.GraphView)">Render(GraphView)</h4>
  266. <div class="markdown level1 summary">
  267. Draws the annotation
  268. </div>
  269. <div class="markdown level1 conceptual"></div>
  270. <h5 class="decalaration">Declaration</h5>
  271. <div class="codewrapper">
  272. <pre><code class="lang-csharp hljs">public void Render(GraphView graph)</code></pre>
  273. </div>
  274. <h5 class="parameters">Parameters</h5>
  275. <table class="table table-bordered table-striped table-condensed">
  276. <thead>
  277. <tr>
  278. <th>Type</th>
  279. <th>Name</th>
  280. <th>Description</th>
  281. </tr>
  282. </thead>
  283. <tbody>
  284. <tr>
  285. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  286. <td><span class="parametername">graph</span></td>
  287. <td></td>
  288. </tr>
  289. </tbody>
  290. </table>
  291. <h3 id="implements">Implements</h3>
  292. <div>
  293. <a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a>
  294. </div>
  295. </article>
  296. </div>
  297. <div class="hidden-sm col-md-2" role="complementary">
  298. <div class="sideaffix">
  299. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  300. <h5>In This Article</h5>
  301. <div></div>
  302. </nav>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <footer>
  308. <div class="grad-bottom"></div>
  309. <div class="footer">
  310. <div class="container">
  311. <span class="pull-right">
  312. <a href="#top">Back to top</a>
  313. </span>
  314. <span>Generated by <strong>DocFX</strong></span>
  315. </div>
  316. </div>
  317. </footer>
  318. </div>
  319. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  320. <script type="text/javascript" src="../../styles/docfx.js"></script>
  321. <script type="text/javascript" src="../../styles/main.js"></script>
  322. </body>
  323. </html>