Terminal.Gui.Graphs.TextAnnotation.html 13 KB

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