# FarPoint.Win.ElementWindowless.GetRotatedTextSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize*">GetRotatedTextSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize*"></a>
<h4 id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_System_Drawing_Graphics_System_String_System_Drawing_Font_System_Drawing_Rectangle_FarPoint_Win_TextOrientation_System_Boolean_System_Drawing_Text_HotkeyPrefix_System_Drawing_StringTrimming_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Rectangle,FarPoint.Win.TextOrientation,System.Boolean,System.Drawing.Text.HotkeyPrefix,System.Drawing.StringTrimming)">GetRotatedTextSize(Graphics, string, Font, Rectangle, TextOrientation, bool, HotkeyPrefix, StringTrimming)</h4>
<div class="markdown level1 summary"><p>Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Size GetRotatedTextSize(Graphics g, string s, Font font, Rectangle r, TextOrientation textOrientation, bool wordWrap, HotkeyPrefix hotkeyPrefix, StringTrimming stringTrim)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetRotatedTextSize(g As Graphics, s As String, font As Font, r As Rectangle, textOrientation As TextOrientation, wordWrap As Boolean, hotkeyPrefix As HotkeyPrefix, stringTrim As StringTrimming) As Size</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String</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</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>Rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Text orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>True to wrap text, false otherwise.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">hotkeyPrefix</span></td>
      <td><p>HotkeyPrefix</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">stringTrim</span></td>
      <td><p>StringTrimming</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="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>Size</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize*"></a>
<h4 id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_System_Drawing_Graphics_System_String_System_Drawing_Font_System_Drawing_RectangleF_FarPoint_Win_TextOrientation_System_Boolean_System_Drawing_Text_HotkeyPrefix_System_Drawing_StringTrimming_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.RectangleF,FarPoint.Win.TextOrientation,System.Boolean,System.Drawing.Text.HotkeyPrefix,System.Drawing.StringTrimming)">GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, HotkeyPrefix, StringTrimming)</h4>
<div class="markdown level1 summary"><p>Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static SizeF GetRotatedTextSize(Graphics g, string s, Font font, RectangleF r, TextOrientation textOrientation, bool wordWrap, HotkeyPrefix hotkeyPrefix, StringTrimming stringTrim)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetRotatedTextSize(g As Graphics, s As String, font As Font, r As RectangleF, textOrientation As TextOrientation, wordWrap As Boolean, hotkeyPrefix As HotkeyPrefix, stringTrim As StringTrimming) As SizeF</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String</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</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>RectangleF</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Text orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>True to wrap text, false otherwise</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">hotkeyPrefix</span></td>
      <td><p>HotkeyPrefix</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">stringTrim</span></td>
      <td><p>StringTrimming</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="https://learn.microsoft.com/dotnet/api/system.drawing.sizef">SizeF</a></td>
      <td><p>SizeF</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize*"></a>
<h4 id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_System_Drawing_Graphics_System_String_System_Drawing_Font_System_Drawing_RectangleF_FarPoint_Win_TextOrientation_System_Boolean_System_Boolean_System_Drawing_Text_HotkeyPrefix_System_Drawing_StringTrimming_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.RectangleF,FarPoint.Win.TextOrientation,System.Boolean,System.Boolean,System.Drawing.Text.HotkeyPrefix,System.Drawing.StringTrimming)">GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming)</h4>
<div class="markdown level1 summary"><p>Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static SizeF GetRotatedTextSize(Graphics g, string s, Font font, RectangleF r, TextOrientation textOrientation, bool wordWrap, bool multiline, HotkeyPrefix hotkeyPrefix, StringTrimming stringTrim)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetRotatedTextSize(g As Graphics, s As String, font As Font, r As RectangleF, textOrientation As TextOrientation, wordWrap As Boolean, multiline As Boolean, hotkeyPrefix As HotkeyPrefix, stringTrim As StringTrimming) As SizeF</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String</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</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>RectangleF</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Text orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>True to wrap text, false otherwise</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">multiline</span></td>
      <td><p>True to draw multiline text, false otherwise</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">hotkeyPrefix</span></td>
      <td><p>HotkeyPrefix</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">stringTrim</span></td>
      <td><p>StringTrimming</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="https://learn.microsoft.com/dotnet/api/system.drawing.sizef">SizeF</a></td>
      <td><p>SizeF</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize*"></a>
<h4 id="FarPoint_Win_ElementWindowless_GetRotatedTextSize_System_Drawing_Graphics_System_String_System_Drawing_Font_System_Drawing_RectangleF_FarPoint_Win_TextOrientation_System_Boolean_System_Drawing_Text_HotkeyPrefix_System_Drawing_StringTrimming_System_Double_" data-uid="FarPoint.Win.ElementWindowless.GetRotatedTextSize(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.RectangleF,FarPoint.Win.TextOrientation,System.Boolean,System.Drawing.Text.HotkeyPrefix,System.Drawing.StringTrimming,System.Double)">GetRotatedTextSize(Graphics, string, Font, RectangleF, TextOrientation, bool, HotkeyPrefix, StringTrimming, double)</h4>
<div class="markdown level1 summary"><p>Gets the size of the specified text when drawn with the specified font, orientation, wrapping, hotkey prefix, and string trimming.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static SizeF GetRotatedTextSize(Graphics g, string s, Font font, RectangleF r, TextOrientation textOrientation, bool wordWrap, HotkeyPrefix hotkeyPrefix, StringTrimming stringTrim, double angle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetRotatedTextSize(g As Graphics, s As String, font As Font, r As RectangleF, textOrientation As TextOrientation, wordWrap As Boolean, hotkeyPrefix As HotkeyPrefix, stringTrim As StringTrimming, angle As Double) As SizeF</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String</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</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>RectangleF</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Text orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>True to wrap text, false otherwise</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">hotkeyPrefix</span></td>
      <td><p>HotkeyPrefix</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">stringTrim</span></td>
      <td><p>StringTrimming</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">angle</span></td>
      <td><p>The text rotation angle.</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="https://learn.microsoft.com/dotnet/api/system.drawing.sizef">SizeF</a></td>
      <td><p>SizeF</p>
</td>
    </tr>
  </tbody>
</table>
</div>
