# GrapeCity.Documents.Layout.Composition.Layer.CreateVisual

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*">CreateVisual Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_System_Boolean_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(System.Boolean)">CreateVisual(bool)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents a drawing element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(bool createRect = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(Optional createRect As Boolean = True) As Visual</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.boolean">bool</a></td>
      <td><span class="parametername">createRect</span></td>
      <td><p>Indicates whether a new <a class="xref" href="GrapeCity.Documents.Layout.LayoutRect.html">LayoutRect</a> must be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_System_Int32_System_Boolean_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(System.Int32,System.Boolean)">CreateVisual(int, bool)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents a drawing element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(int id, bool createRect = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(id As Integer, Optional createRect As Boolean = True) As Visual</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.int32">int</a></td>
      <td><span class="parametername">id</span></td>
      <td><p>A custom space ID. It must be positive and unique within the <a class="xref" href="GrapeCity.Documents.Layout.Composition.View.html">View</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">createRect</span></td>
      <td><p>Indicates whether a new <a class="xref" href="GrapeCity.Documents.Layout.LayoutRect.html">LayoutRect</a> must be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_System_Action_GrapeCity_Documents_Drawing_GcGraphics_GrapeCity_Documents_Layout_Composition_Visual__" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(System.Action{GrapeCity.Documents.Drawing.GcGraphics,GrapeCity.Documents.Layout.Composition.Visual})">CreateVisual(Action&lt;GcGraphics, Visual&gt;)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents a drawing element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(Action&lt;GcGraphics, Visual&gt; draw)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(draw As Action(Of GcGraphics, Visual)) As Visual</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.action-2">Action</a>&lt;<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>, <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>&gt;</td>
      <td><span class="parametername">draw</span></td>
      <td><p>A delegate that accepts a <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a> object and a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>,
and draws the visual on the graphics.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_GrapeCity_Documents_Layout_Contour_System_Boolean_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(GrapeCity.Documents.Layout.Contour,System.Boolean)">CreateVisual(Contour, bool)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents an element drawing the <a class="xref" href="GrapeCity.Documents.Layout.Contour.html">Contour</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(Contour contour, bool createRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(contour As Contour, createRect As Boolean) As Visual</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="GrapeCity.Documents.Layout.Contour.html">Contour</a></td>
      <td><span class="parametername">contour</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Layout.Contour.html">Contour</a> to be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">createRect</span></td>
      <td><p>Indicates whether a new <a class="xref" href="GrapeCity.Documents.Layout.LayoutRect.html">LayoutRect</a> must be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_GrapeCity_Documents_Layout_Contour_System_Boolean_System_Action_GrapeCity_Documents_Drawing_GcGraphics_GrapeCity_Documents_Layout_Composition_Visual__" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(GrapeCity.Documents.Layout.Contour,System.Boolean,System.Action{GrapeCity.Documents.Drawing.GcGraphics,GrapeCity.Documents.Layout.Composition.Visual})">CreateVisual(Contour, bool, Action&lt;GcGraphics, Visual&gt;)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents an element drawing the <a class="xref" href="GrapeCity.Documents.Layout.Contour.html">Contour</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(Contour contour, bool createRect, Action&lt;GcGraphics, Visual&gt; draw)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(contour As Contour, createRect As Boolean, draw As Action(Of GcGraphics, Visual)) As Visual</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="GrapeCity.Documents.Layout.Contour.html">Contour</a></td>
      <td><span class="parametername">contour</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Documents.Layout.Contour.html">Contour</a> to be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">createRect</span></td>
      <td><p>Indicates whether a new <a class="xref" href="GrapeCity.Documents.Layout.LayoutRect.html">LayoutRect</a> must be associated with the <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-2">Action</a>&lt;<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>, <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>&gt;</td>
      <td><span class="parametername">draw</span></td>
      <td><p>A delegate that accepts a <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a> object and a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>,
and draws the visual on the graphics.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_GrapeCity_Documents_Layout_AnchorPoint___" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(GrapeCity.Documents.Layout.AnchorPoint[])">CreateVisual(AnchorPoint[])</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents a polygon based on the given <a class="xref" href="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>s.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(AnchorPoint[] anchorPoints)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(anchorPoints As AnchorPoint()) As Visual</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="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>[]</td>
      <td><span class="parametername">anchorPoints</span></td>
      <td><p>An array of <a class="xref" href="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>s to draw.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual*"></a>
<h4 id="GrapeCity_Documents_Layout_Composition_Layer_CreateVisual_GrapeCity_Documents_Layout_AnchorPoint___System_Action_GrapeCity_Documents_Drawing_GcGraphics_GrapeCity_Documents_Layout_Composition_Visual__" data-uid="GrapeCity.Documents.Layout.Composition.Layer.CreateVisual(GrapeCity.Documents.Layout.AnchorPoint[],System.Action{GrapeCity.Documents.Drawing.GcGraphics,GrapeCity.Documents.Layout.Composition.Visual})">CreateVisual(AnchorPoint[], Action&lt;GcGraphics, Visual&gt;)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a> object that represents a polygon based on the given <a class="xref" href="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>s.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Visual CreateVisual(AnchorPoint[] anchorPoints, Action&lt;GcGraphics, Visual&gt; draw)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateVisual(anchorPoints As AnchorPoint(), draw As Action(Of GcGraphics, Visual)) As Visual</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="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>[]</td>
      <td><span class="parametername">anchorPoints</span></td>
      <td><p>An array of <a class="xref" href="GrapeCity.Documents.Layout.AnchorPoint.html">AnchorPoint</a>s to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-2">Action</a>&lt;<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>, <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>&gt;</td>
      <td><span class="parametername">draw</span></td>
      <td><p>A delegate that accepts a <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a> object and a <a class="xref" href="GrapeCity.Documents.Layout.Composition.Visual.html">Visual</a>,
and draws the visual on the graphics.</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.Layout.Composition.Visual.html">Visual</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
