# FarPoint.Win.FpHyperlink.DoPaint

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_FpHyperlink_DoPaint_" data-uid="FarPoint.Win.FpHyperlink.DoPaint*">DoPaint Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_FpHyperlink_DoPaint_" data-uid="FarPoint.Win.FpHyperlink.DoPaint*"></a>
<h4 id="FarPoint_Win_FpHyperlink_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Windows_Forms_LinkArea___System_Drawing_Color_System_Drawing_Color_FarPoint_Win_Picture_System_Boolean___System_Boolean_System_Boolean_" data-uid="FarPoint.Win.FpHyperlink.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Windows.Forms.LinkArea[],System.Drawing.Color,System.Drawing.Color,FarPoint.Win.Picture,System.Boolean[],System.Boolean,System.Boolean)">DoPaint(Graphics, Rectangle, string, Color, Color, Font, HorizontalAlignment, VerticalAlignment, LinkArea[], Color, Color, Picture, bool[], bool, bool)</h4>
<div class="markdown level1 summary"><p>Paints the cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, string text, Color backColor, Color foreColor, Font font, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, LinkArea[] areas, Color linkColor, Color visitedColor, Picture pict, bool[] visited, bool bLocked, bool rightToLeft)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, text As String, backColor As Color, foreColor As Color, font As Font, horizontalAlignment As HorizontalAlignment, verticalAlignment As VerticalAlignment, areas As LinkArea(), linkColor As Color, visitedColor As Color, pict As Picture, visited As Boolean(), bLocked As Boolean, rightToLeft As Boolean)</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.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>GDI+ graphics surface</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>Image rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text of the hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>Background color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>Foreground (text) color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font of hyperlink text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">horizontalAlignment</span></td>
      <td><p>Horizontal alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">verticalAlignment</span></td>
      <td><p>Vertical alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.linkarea">LinkArea</a>[]</td>
      <td><span class="parametername">areas</span></td>
      <td><p>Areas that are hyperlinked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">linkColor</span></td>
      <td><p>Color of hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">visitedColor</span></td>
      <td><p>Color of the previously-visited hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Picture.html">Picture</a></td>
      <td><span class="parametername">pict</span></td>
      <td><p>Picture (image)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>[]</td>
      <td><span class="parametername">visited</span></td>
      <td><p>Whether the hyperlink has been clicked (visited) before</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">bLocked</span></td>
      <td><p>Whether the control is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rightToLeft</span></td>
      <td><p>Whether to set right to left</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_FpHyperlink_DoPaint_" data-uid="FarPoint.Win.FpHyperlink.DoPaint*"></a>
<h4 id="FarPoint_Win_FpHyperlink_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Windows_Forms_LinkArea___System_Drawing_Color_System_Drawing_Color_FarPoint_Win_Picture_System_Boolean___System_Boolean_System_Boolean_System_Drawing_StringTrimming_" data-uid="FarPoint.Win.FpHyperlink.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Windows.Forms.LinkArea[],System.Drawing.Color,System.Drawing.Color,FarPoint.Win.Picture,System.Boolean[],System.Boolean,System.Boolean,System.Drawing.StringTrimming)">DoPaint(Graphics, Rectangle, string, Color, Color, Font, HorizontalAlignment, VerticalAlignment, LinkArea[], Color, Color, Picture, bool[], bool, bool, StringTrimming)</h4>
<div class="markdown level1 summary"><p>Paints the cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, string text, Color backColor, Color foreColor, Font font, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, LinkArea[] areas, Color linkColor, Color visitedColor, Picture pict, bool[] visited, bool bLocked, bool rightToLeft, StringTrimming trim)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, text As String, backColor As Color, foreColor As Color, font As Font, horizontalAlignment As HorizontalAlignment, verticalAlignment As VerticalAlignment, areas As LinkArea(), linkColor As Color, visitedColor As Color, pict As Picture, visited As Boolean(), bLocked As Boolean, rightToLeft As Boolean, trim As StringTrimming)</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.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>GDI+ graphics surface</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>Image rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text of the hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>Background color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>Foreground (text) color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font of hyperlink text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">horizontalAlignment</span></td>
      <td><p>Horizontal alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">verticalAlignment</span></td>
      <td><p>Vertical alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.linkarea">LinkArea</a>[]</td>
      <td><span class="parametername">areas</span></td>
      <td><p>Areas that are hyperlinked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">linkColor</span></td>
      <td><p>Color of hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">visitedColor</span></td>
      <td><p>Color of the previously-visited hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Picture.html">Picture</a></td>
      <td><span class="parametername">pict</span></td>
      <td><p>Picture (image)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>[]</td>
      <td><span class="parametername">visited</span></td>
      <td><p>Whether the hyperlink has been clicked (visited) before</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">bLocked</span></td>
      <td><p>Whether the control is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rightToLeft</span></td>
      <td><p>Whether to set right to left</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.stringtrimming">StringTrimming</a></td>
      <td><span class="parametername">trim</span></td>
      <td><p>StringTrimming setting</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_FpHyperlink_DoPaint_" data-uid="FarPoint.Win.FpHyperlink.DoPaint*"></a>
<h4 id="FarPoint_Win_FpHyperlink_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_String_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Windows_Forms_LinkArea___System_Drawing_Color_System_Drawing_Color_FarPoint_Win_Picture_System_Boolean___System_Boolean_System_Boolean_System_Drawing_StringTrimming_System_Boolean_" data-uid="FarPoint.Win.FpHyperlink.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.String,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Windows.Forms.LinkArea[],System.Drawing.Color,System.Drawing.Color,FarPoint.Win.Picture,System.Boolean[],System.Boolean,System.Boolean,System.Drawing.StringTrimming,System.Boolean)">DoPaint(Graphics, Rectangle, string, Color, Color, Font, HorizontalAlignment, VerticalAlignment, LinkArea[], Color, Color, Picture, bool[], bool, bool, StringTrimming, bool)</h4>
<div class="markdown level1 summary"><p>Paints the cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, string text, Color backColor, Color foreColor, Font font, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, LinkArea[] areas, Color linkColor, Color visitedColor, Picture pict, bool[] visited, bool bLocked, bool rightToLeft, StringTrimming trim, bool isGrayscale)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, text As String, backColor As Color, foreColor As Color, font As Font, horizontalAlignment As HorizontalAlignment, verticalAlignment As VerticalAlignment, areas As LinkArea(), linkColor As Color, visitedColor As Color, pict As Picture, visited As Boolean(), bLocked As Boolean, rightToLeft As Boolean, trim As StringTrimming, isGrayscale As Boolean)</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.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>GDI+ graphics surface</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>Image rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text of the hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>Background color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>Foreground (text) color</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font of hyperlink text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">horizontalAlignment</span></td>
      <td><p>Horizontal alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">verticalAlignment</span></td>
      <td><p>Vertical alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.linkarea">LinkArea</a>[]</td>
      <td><span class="parametername">areas</span></td>
      <td><p>Areas that are hyperlinked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">linkColor</span></td>
      <td><p>Color of hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">visitedColor</span></td>
      <td><p>Color of the previously-visited hyperlink</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Picture.html">Picture</a></td>
      <td><span class="parametername">pict</span></td>
      <td><p>Picture (image)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>[]</td>
      <td><span class="parametername">visited</span></td>
      <td><p>Whether the hyperlink has been clicked (visited) before</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">bLocked</span></td>
      <td><p>Whether the control is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rightToLeft</span></td>
      <td><p>Whether to set right to left</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.stringtrimming">StringTrimming</a></td>
      <td><span class="parametername">trim</span></td>
      <td><p>StringTrimming setting</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isGrayscale</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
