# C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc*">DrawArc Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc*"></a>
<h4 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_System_Drawing_Point_System_UInt32_System_Single_System_Single_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc(System.Drawing.Point,System.UInt32,System.Single,System.Single)">DrawArc(Point, uint, float, float)</h4>
<div class="markdown level1 summary"><p>Draws a line segment and an arc.
The line segment is drawn from the position which is defined by <code>radius</code> and <code>startAngle</code>.
The arc is drawn along the perimeter of a circle with the given radius and center.
The length of the arc is defined by the given start and sweep angles.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void DrawArc(Point origin, uint radius, float startAngle, float sweepAngle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub DrawArc(origin As Point, radius As UInteger, startAngle As Single, sweepAngle As Single)</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.point">Point</a></td>
      <td><span class="parametername">origin</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a> specifies the center of the circle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uint32">uint</a></td>
      <td><span class="parametername">radius</span></td>
      <td><p>A <b>uint</b> specifies the radius of the circle. This value must be positive.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">startAngle</span></td>
      <td><p>A <b>float</b> specifies the start angle, in degrees.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">sweepAngle</span></td>
      <td><p>A <b>float</b> specifies the sweep angle, in degrees, relative to the starting angle.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_System_Drawing_Point_System_UInt32_System_Single_System_Single__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The arc is drawn by constructing an imaginary circle around the specified center point with the specified radius.
The starting point of the arc is determined by measuring counterclockwise from the x-axis of the circle
by the number of degrees in the start angle. The ending point is similarly located by measuring counterclockwise
from the starting point by the number of degrees in the sweep angle.
If the sweep angle is greater than 360 degrees,the arc is swept multiple times.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Framework.SystemErrorException.html">SystemErrorException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc*"></a>
<h4 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_System_Drawing_Rectangle_System_Drawing_Point_System_Drawing_Point_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.DrawArc(System.Drawing.Rectangle,System.Drawing.Point,System.Drawing.Point)">DrawArc(Rectangle, Point, Point)</h4>
<div class="markdown level1 summary"><p>Draws an elliptical arc.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void DrawArc(Rectangle rectangle, Point firstRadial, Point secondRadial)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub DrawArc(rectangle As Rectangle, firstRadial As Point, secondRadial As Point)</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.rectangle">Rectangle</a></td>
      <td><span class="parametername">rectangle</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a> specifies the bounding rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a></td>
      <td><span class="parametername">firstRadial</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a> specifies the ending point of the radial line defining the starting point of the arc.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a></td>
      <td><span class="parametername">secondRadial</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a> specifies the ending point of the radial line defining the ending point of the arc.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_DrawArc_System_Drawing_Rectangle_System_Drawing_Point_System_Drawing_Point__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <code>rectangle</code> specify the bounding rectangle. An ellipse formed by the specified bounding rectangle
defines the curve of the arc. The arc extends in the current drawing direction from the point where it intersects
the radial from the center of the bounding rectangle to the <code>firstRadial</code> point. The arc ends where
it intersects the radial from the center of the bounding rectangle to the <code>secondRadial</code> point.
If the starting point and ending point are the same, a complete ellipse is drawn.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Framework.SystemErrorException.html">SystemErrorException</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
