Terminal.Gui.Graphs.TextAnnotation.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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.3.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 class="implements">
  85. <h5>Implements</h5>
  86. <div><a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a></div>
  87. </div>
  88. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.Graphs.html">Terminal.Gui.Graphs</a></h6>
  89. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  90. <h5 id="Terminal_Gui_Graphs_TextAnnotation_syntax">Syntax</h5>
  91. <div class="codewrapper">
  92. <pre><code class="lang-csharp hljs">public class TextAnnotation : Object, IAnnotation</code></pre>
  93. </div>
  94. <h3 id="constructors">Constructors
  95. </h3>
  96. <a id="Terminal_Gui_Graphs_TextAnnotation__ctor_" data-uid="Terminal.Gui.Graphs.TextAnnotation.#ctor*"></a>
  97. <h4 id="Terminal_Gui_Graphs_TextAnnotation__ctor" data-uid="Terminal.Gui.Graphs.TextAnnotation.#ctor">TextAnnotation()</h4>
  98. <div class="markdown level1 summary"></div>
  99. <div class="markdown level1 conceptual"></div>
  100. <h5 class="decalaration">Declaration</h5>
  101. <div class="codewrapper">
  102. <pre><code class="lang-csharp hljs">public TextAnnotation()</code></pre>
  103. </div>
  104. <h3 id="properties">Properties
  105. </h3>
  106. <a id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries_" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries*"></a>
  107. <h4 id="Terminal_Gui_Graphs_TextAnnotation_BeforeSeries" data-uid="Terminal.Gui.Graphs.TextAnnotation.BeforeSeries">BeforeSeries</h4>
  108. <div class="markdown level1 summary">
  109. True to add text before plotting series. Defaults to false
  110. </div>
  111. <div class="markdown level1 conceptual"></div>
  112. <h5 class="decalaration">Declaration</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public bool BeforeSeries { get; set; }</code></pre>
  115. </div>
  116. <h5 class="propertyValue">Property Value</h5>
  117. <table class="table table-bordered table-striped table-condensed">
  118. <thead>
  119. <tr>
  120. <th>Type</th>
  121. <th>Description</th>
  122. </tr>
  123. </thead>
  124. <tbody>
  125. <tr>
  126. <td><span class="xref">System.Boolean</span></td>
  127. <td></td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. <a id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition*"></a>
  132. <h4 id="Terminal_Gui_Graphs_TextAnnotation_GraphPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.GraphPosition">GraphPosition</h4>
  133. <div class="markdown level1 summary">
  134. 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
  135. annotation will only show if the point is in the current viewable
  136. area of the graph presented in the <a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a>
  137. </div>
  138. <div class="markdown level1 conceptual"></div>
  139. <h5 class="decalaration">Declaration</h5>
  140. <div class="codewrapper">
  141. <pre><code class="lang-csharp hljs">public PointF GraphPosition { get; set; }</code></pre>
  142. </div>
  143. <h5 class="propertyValue">Property Value</h5>
  144. <table class="table table-bordered table-striped table-condensed">
  145. <thead>
  146. <tr>
  147. <th>Type</th>
  148. <th>Description</th>
  149. </tr>
  150. </thead>
  151. <tbody>
  152. <tr>
  153. <td><a class="xref" href="Terminal.Gui.PointF.html">PointF</a></td>
  154. <td></td>
  155. </tr>
  156. </tbody>
  157. </table>
  158. <a id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition_" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition*"></a>
  159. <h4 id="Terminal_Gui_Graphs_TextAnnotation_ScreenPosition" data-uid="Terminal.Gui.Graphs.TextAnnotation.ScreenPosition">ScreenPosition</h4>
  160. <div class="markdown level1 summary">
  161. The location on screen to draw the <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_Text">Text</a> regardless
  162. of scroll/zoom settings. This overrides <a class="xref" href="Terminal.Gui.Graphs.TextAnnotation.html#Terminal_Gui_Graphs_TextAnnotation_GraphPosition">GraphPosition</a>
  163. if specified.
  164. </div>
  165. <div class="markdown level1 conceptual"></div>
  166. <h5 class="decalaration">Declaration</h5>
  167. <div class="codewrapper">
  168. <pre><code class="lang-csharp hljs">public Nullable&lt;Point&gt; ScreenPosition { get; set; }</code></pre>
  169. </div>
  170. <h5 class="propertyValue">Property Value</h5>
  171. <table class="table table-bordered table-striped table-condensed">
  172. <thead>
  173. <tr>
  174. <th>Type</th>
  175. <th>Description</th>
  176. </tr>
  177. </thead>
  178. <tbody>
  179. <tr>
  180. <td><span class="xref">System.Nullable</span>&lt;<a class="xref" href="Terminal.Gui.Point.html">Point</a>&gt;</td>
  181. <td></td>
  182. </tr>
  183. </tbody>
  184. </table>
  185. <a id="Terminal_Gui_Graphs_TextAnnotation_Text_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text*"></a>
  186. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Text" data-uid="Terminal.Gui.Graphs.TextAnnotation.Text">Text</h4>
  187. <div class="markdown level1 summary">
  188. Text to display on the graph
  189. </div>
  190. <div class="markdown level1 conceptual"></div>
  191. <h5 class="decalaration">Declaration</h5>
  192. <div class="codewrapper">
  193. <pre><code class="lang-csharp hljs">public string Text { get; set; }</code></pre>
  194. </div>
  195. <h5 class="propertyValue">Property Value</h5>
  196. <table class="table table-bordered table-striped table-condensed">
  197. <thead>
  198. <tr>
  199. <th>Type</th>
  200. <th>Description</th>
  201. </tr>
  202. </thead>
  203. <tbody>
  204. <tr>
  205. <td><span class="xref">System.String</span></td>
  206. <td></td>
  207. </tr>
  208. </tbody>
  209. </table>
  210. <h3 id="methods">Methods
  211. </h3>
  212. <a id="Terminal_Gui_Graphs_TextAnnotation_DrawText_" data-uid="Terminal.Gui.Graphs.TextAnnotation.DrawText*"></a>
  213. <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>
  214. <div class="markdown level1 summary">
  215. 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
  216. spilling over <see name="View.Bounds"></see> of the <code data-dev-comment-type="paramref" class="paramref">graph</code>
  217. </div>
  218. <div class="markdown level1 conceptual"></div>
  219. <h5 class="decalaration">Declaration</h5>
  220. <div class="codewrapper">
  221. <pre><code class="lang-csharp hljs">protected void DrawText(GraphView graph, int x, int y)</code></pre>
  222. </div>
  223. <h5 class="parameters">Parameters</h5>
  224. <table class="table table-bordered table-striped table-condensed">
  225. <thead>
  226. <tr>
  227. <th>Type</th>
  228. <th>Name</th>
  229. <th>Description</th>
  230. </tr>
  231. </thead>
  232. <tbody>
  233. <tr>
  234. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  235. <td><span class="parametername">graph</span></td>
  236. <td></td>
  237. </tr>
  238. <tr>
  239. <td><span class="xref">System.Int32</span></td>
  240. <td><span class="parametername">x</span></td>
  241. <td>Screen x position to start drawing string</td>
  242. </tr>
  243. <tr>
  244. <td><span class="xref">System.Int32</span></td>
  245. <td><span class="parametername">y</span></td>
  246. <td>Screen y position to start drawing string</td>
  247. </tr>
  248. </tbody>
  249. </table>
  250. <a id="Terminal_Gui_Graphs_TextAnnotation_Render_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render*"></a>
  251. <h4 id="Terminal_Gui_Graphs_TextAnnotation_Render_Terminal_Gui_GraphView_" data-uid="Terminal.Gui.Graphs.TextAnnotation.Render(Terminal.Gui.GraphView)">Render(GraphView)</h4>
  252. <div class="markdown level1 summary">
  253. Draws the annotation
  254. </div>
  255. <div class="markdown level1 conceptual"></div>
  256. <h5 class="decalaration">Declaration</h5>
  257. <div class="codewrapper">
  258. <pre><code class="lang-csharp hljs">public void Render(GraphView graph)</code></pre>
  259. </div>
  260. <h5 class="parameters">Parameters</h5>
  261. <table class="table table-bordered table-striped table-condensed">
  262. <thead>
  263. <tr>
  264. <th>Type</th>
  265. <th>Name</th>
  266. <th>Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  272. <td><span class="parametername">graph</span></td>
  273. <td></td>
  274. </tr>
  275. </tbody>
  276. </table>
  277. <h3 id="implements">Implements</h3>
  278. <div>
  279. <a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a>
  280. </div>
  281. </article>
  282. </div>
  283. <div class="hidden-sm col-md-2" role="complementary">
  284. <div class="sideaffix">
  285. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  286. <h5>In This Article</h5>
  287. <div></div>
  288. </nav>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <footer>
  294. <div class="grad-bottom"></div>
  295. <div class="footer">
  296. <div class="container">
  297. <span class="pull-right">
  298. <a href="#top">Back to top</a>
  299. </span>
  300. <span>Generated by <strong>DocFX</strong></span>
  301. </div>
  302. </div>
  303. </footer>
  304. </div>
  305. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  306. <script type="text/javascript" src="../../styles/docfx.js"></script>
  307. <script type="text/javascript" src="../../styles/main.js"></script>
  308. </body>
  309. </html>