# C1.C1Preview.RenderGraphics

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_RenderGraphics" data-uid="C1.C1Preview.RenderGraphics" class="text-break">RenderGraphics Class
</h1>
  <div class="markdown level0 summary"><p>Represents a drawing on a .NET <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object
in a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a></div>
    <div class="level2"><span class="xref">RenderGraphics</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="C1.C1Preview.IStyleOwner.html">IStyleOwner</a></div>
    <div><a class="xref" href="C1.C1Preview.IDocumentLocation.html">IDocumentLocation</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.html">C1.C1Preview</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.PrintDocument.4.6.2.dll</h6>
  <h5 id="C1_C1Preview_RenderGraphics_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class RenderGraphics : RenderObject, IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class RenderGraphics
    Inherits RenderObject
    Implements IStyleOwner, IDocumentLocation</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderGraphics__ctor" data-uid="C1.C1Preview.RenderGraphics.#ctor">
          <a class="xref" href="C1.C1Preview.RenderGraphics.-ctor.html#C1_C1Preview_RenderGraphics__ctor">RenderGraphics()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_EmfType" data-uid="C1.C1Preview.RenderGraphics.EmfType">
          <a class="xref" href="C1.C1Preview.RenderGraphics.EmfType.html#C1_C1Preview_RenderGraphics_EmfType">EmfType</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the type of metafile created by the current <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_Graphics" data-uid="C1.C1Preview.RenderGraphics.Graphics">
          <a class="xref" href="C1.C1Preview.RenderGraphics.Graphics.html#C1_C1Preview_RenderGraphics_Graphics">Graphics</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object to draw on.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_GraphicsSizeEqualToObjectSize" data-uid="C1.C1Preview.RenderGraphics.GraphicsSizeEqualToObjectSize">
          <a class="xref" href="C1.C1Preview.RenderGraphics.GraphicsSizeEqualToObjectSize.html#C1_C1Preview_RenderGraphics_GraphicsSizeEqualToObjectSize">GraphicsSizeEqualToObjectSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets value indicating whether size of <a class="xref" href="C1.C1Preview.RenderGraphics.Graphics.html#C1_C1Preview_RenderGraphics_Graphics">Graphics</a> object
managed by this <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> same as <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> size.
Set this property to <b>true</b> if you want to create image
with exact sizes.
If this property is <b>true</b> then <a class="xref" href="C1.C1Preview.RenderObject.Width.html#C1_C1Preview_RenderObject_Width">Width</a> and <a class="xref" href="C1.C1Preview.RenderObject.Height.html#C1_C1Preview_RenderObject_Height">Height</a>
should be specified as absolute values (10mm, 1inch for example).
<a class="xref" href="C1.C1Preview.RenderGraphics.GraphicsSizeEqualToObjectSize.html#C1_C1Preview_RenderGraphics_GraphicsSizeEqualToObjectSize">GraphicsSizeEqualToObjectSize</a> should be specified as <b>true</b> and
<a class="xref" href="C1.C1Preview.RenderObject.Width.html#C1_C1Preview_RenderObject_Width">Width</a> and <a class="xref" href="C1.C1Preview.RenderObject.Height.html#C1_C1Preview_RenderObject_Height">Height</a> should be specified in absolute units
<b>before</b> accessing to <a class="xref" href="C1.C1Preview.RenderGraphics.Graphics.html#C1_C1Preview_RenderGraphics_Graphics">Graphics</a> property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_ReferenceGraphics" data-uid="C1.C1Preview.RenderGraphics.ReferenceGraphics">
          <a class="xref" href="C1.C1Preview.RenderGraphics.ReferenceGraphics.html#C1_C1Preview_RenderGraphics_ReferenceGraphics">ReferenceGraphics</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the reference <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> used to create the underlying metafile.
This property is simply a shortcut to the <a class="xref" href="C1.C1Preview.C1PrintDocument.CreationGraphics.html#C1_C1Preview_C1PrintDocument_CreationGraphics">CreationGraphics</a> property,
and returns <b>null</b> if the current <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> object has not been added
to a <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a> yet.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_UseClassicDrawMethod" data-uid="C1.C1Preview.RenderGraphics.UseClassicDrawMethod">
          <a class="xref" href="C1.C1Preview.RenderGraphics.UseClassicDrawMethod.html#C1_C1Preview_RenderGraphics_UseClassicDrawMethod">UseClassicDrawMethod</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets value indicating whether Graphics.DrawImage(Image, dstRect)
method should be used to draw content of object instead of
Graphics.DrawImage(Image, dstRect, srcRect, GraphicsUnit). In some rare cases
it produces more convient results. Default is false.
Set this value to true if problems occurs with drawing RenderGraphics content.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.C1Preview.RenderGraphics.AssignFrom(C1.C1Preview.RenderObject,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)">
          <a class="xref" href="C1.C1Preview.RenderGraphics.AssignFrom.html#C1_C1Preview_RenderGraphics_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_">AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Assigns (copies) properties from another <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a> to the current object.
Calls the base <a class="xref" href="C1.C1Preview.RenderObject.AssignFrom.html#C1_C1Preview_RenderObject_AssignFrom_C1_C1Preview_RenderObject_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_System_Boolean_">AssignFrom(RenderObject, bool, bool, bool, bool, bool, bool)</a> method.
If <code class="paramref">source</code> is a <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a>, also copies <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a>-specific properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_Clear" data-uid="C1.C1Preview.RenderGraphics.Clear">
          <a class="xref" href="C1.C1Preview.RenderGraphics.Clear.html#C1_C1Preview_RenderGraphics_Clear">Clear()</a>
        </td>
        <td class="markdown level1 summary"><p>Clears the current <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_CreateSame" data-uid="C1.C1Preview.RenderGraphics.CreateSame">
          <a class="xref" href="C1.C1Preview.RenderGraphics.CreateSame.html#C1_C1Preview_RenderGraphics_CreateSame">CreateSame()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates new empty <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> object
linked with same <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a> as current object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_ShouldSerializeContent" data-uid="C1.C1Preview.RenderGraphics.ShouldSerializeContent">
          <a class="xref" href="C1.C1Preview.RenderGraphics.ShouldSerializeContent.html#C1_C1Preview_RenderGraphics_ShouldSerializeContent">ShouldSerializeContent()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the content of the current <a class="xref" href="C1.C1Preview.RenderGraphics.html">RenderGraphics</a> object
should be serialized (i.e. is not empty).</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_RenderGraphics_ShouldSerializeOpenXmlContent" data-uid="C1.C1Preview.RenderGraphics.ShouldSerializeOpenXmlContent">
          <a class="xref" href="C1.C1Preview.RenderGraphics.ShouldSerializeOpenXmlContent.html#C1_C1Preview_RenderGraphics_ShouldSerializeOpenXmlContent">ShouldSerializeOpenXmlContent()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
