# GrapeCity.Documents.Pdf.TextMap.ITextMap.HitTest

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Pdf_TextMap_ITextMap_HitTest_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.HitTest*">HitTest Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Pdf_TextMap_ITextMap_HitTest_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.HitTest*"></a>
<h4 id="GrapeCity_Documents_Pdf_TextMap_ITextMap_HitTest_System_Single_System_Single_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.HitTest(System.Single,System.Single)">HitTest(float, float)</h4>
<div class="markdown level1 summary"><p>Performs hit testing on the map.</p>
<p>
This method accepts a pixel location relative to the top left corner of the page,
and provides info about the text in that location.
</p>
<p>
The pixel resolution is the resolution specified when building this text map
(see <a class="xref" href="GrapeCity.Documents.Pdf.Page.GetTextMap.html#GrapeCity_Documents_Pdf_Page_GetTextMap_System_Single_System_Single_System_Boolean_">GetTextMap(float, float, bool)</a> and other GetTextMap() overloads).
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">HitTestInfo HitTest(float x, float y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function HitTest(x As Single, y As Single) As HitTestInfo</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X pixel location relative to the top left corner of the page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y pixel location relative to the top left corner of the page.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.TextMap.HitTestInfo.html">HitTestInfo</a></td>
      <td><p><a class="xref" href="GrapeCity.Documents.Pdf.TextMap.HitTestInfo.html">HitTestInfo</a> containing the hit test result.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
