# C1.C1Preview.LineDef

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_LineDef" data-uid="C1.C1Preview.LineDef" class="text-break">LineDef Class
</h1>
  <div class="markdown level0 summary"><p>Represents a set of attributes used to draw lines.
This class is immutable.</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"><span class="xref">LineDef</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.html">C1.C1Preview</a></h6>
  <h6><strong>Assembly</strong>: C1.PrintDocument.4.8.dll</h6>
  <h5 id="C1_C1Preview_LineDef_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TypeConverter(typeof(LineDef.TypeConverter))]
public class LineDef</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TypeConverter(GetType(LineDef.TypeConverter))&gt;
Public Class LineDef</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_LineDef__ctor" data-uid="C1.C1Preview.LineDef.#ctor">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor">LineDef()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class
with default values (1pt wide black line).</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Drawing.Color)">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_">LineDef(Unit, Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width and color.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Color_System_Drawing_Drawing2D_DashStyle_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Drawing.Color,System.Drawing.Color,System.Drawing.Drawing2D.DashStyle)">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Color_System_Drawing_Drawing2D_DashStyle_">LineDef(Unit, Color, Color, DashStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color, dash background color and dash style.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Color_System_Single___" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Drawing.Color,System.Drawing.Color,System.Single[])">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Color_System_Single___">LineDef(Unit, Color, Color, float[])</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color, dash background color and dash pattern.
<a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> is set to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle#system-drawing-drawing2d-dashstyle-custom">Custom</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Drawing2D_DashStyle_" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Drawing.Color,System.Drawing.Drawing2D.DashStyle)">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Drawing_Drawing2D_DashStyle_">LineDef(Unit, Color, DashStyle)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color and dash style.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Single___" data-uid="C1.C1Preview.LineDef.#ctor(C1.C1Preview.Unit,System.Drawing.Color,System.Single[])">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_C1_C1Preview_Unit_System_Drawing_Color_System_Single___">LineDef(Unit, Color, float[])</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line width, color and dash pattern.
<a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> is set to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle#system-drawing-drawing2d-dashstyle-custom">Custom</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef__ctor_System_Drawing_Color_" data-uid="C1.C1Preview.LineDef.#ctor(System.Drawing.Color)">
          <a class="xref" href="C1.C1Preview.LineDef.-ctor.html#C1_C1Preview_LineDef__ctor_System_Drawing_Color_">LineDef(Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> class,
assigning line color.</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_LineDef_BackColor" data-uid="C1.C1Preview.LineDef.BackColor">
          <a class="xref" href="C1.C1Preview.LineDef.BackColor.html#C1_C1Preview_LineDef_BackColor">BackColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the the background color of spaces between the dashes of a dashed line.
Not used if <a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle#system-drawing-drawing2d-dashstyle-solid">Solid</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Color" data-uid="C1.C1Preview.LineDef.Color">
          <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the line color.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_DashPattern" data-uid="C1.C1Preview.LineDef.DashPattern">
          <a class="xref" href="C1.C1Preview.LineDef.DashPattern.html#C1_C1Preview_LineDef_DashPattern">DashPattern</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an array of custom dashes and spaces.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_DashStyle" data-uid="C1.C1Preview.LineDef.DashStyle">
          <a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.dashstyle">DashStyle</a> of the current <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Default" data-uid="C1.C1Preview.LineDef.Default">
          <a class="xref" href="C1.C1Preview.LineDef.Default.html#C1_C1Preview_LineDef_Default">Default</a>
        </td>
        <td class="markdown level1 summary"><p>Represents the default regular line (solid black, 1pt wide).</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_DefaultBold" data-uid="C1.C1Preview.LineDef.DefaultBold">
          <a class="xref" href="C1.C1Preview.LineDef.DefaultBold.html#C1_C1Preview_LineDef_DefaultBold">DefaultBold</a>
        </td>
        <td class="markdown level1 summary"><p>Represents the default bold line (solid black, 2pt wide).</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Empty" data-uid="C1.C1Preview.LineDef.Empty">
          <a class="xref" href="C1.C1Preview.LineDef.Empty.html#C1_C1Preview_LineDef_Empty">Empty</a>
        </td>
        <td class="markdown level1 summary"><p>Represents an empty line (with emtpy color and zero width).</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Width" data-uid="C1.C1Preview.LineDef.Width">
          <a class="xref" href="C1.C1Preview.LineDef.Width.html#C1_C1Preview_LineDef_Width">Width</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the line width (thickness).</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_LineDef_Equals_System_Object_" data-uid="C1.C1Preview.LineDef.Equals(System.Object)">
          <a class="xref" href="C1.C1Preview.LineDef.Equals.html#C1_C1Preview_LineDef_Equals_System_Object_">Equals(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the specified <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> object is equal to the current object.
This method compares the property values on the objects.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_GetHashCode" data-uid="C1.C1Preview.LineDef.GetHashCode">
          <a class="xref" href="C1.C1Preview.LineDef.GetHashCode.html#C1_C1Preview_LineDef_GetHashCode">GetHashCode()</a>
        </td>
        <td class="markdown level1 summary"><p>Serves as a hash function for the <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_IsSameStyle_C1_C1Preview_LineDef_" data-uid="C1.C1Preview.LineDef.IsSameStyle(C1.C1Preview.LineDef)">
          <a class="xref" href="C1.C1Preview.LineDef.IsSameStyle.html#C1_C1Preview_LineDef_IsSameStyle_C1_C1Preview_LineDef_">IsSameStyle(LineDef)</a>
        </td>
        <td class="markdown level1 summary"><p>Tests whether the current and another <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> objects define
same line styles - i.e. whether the values of <a class="xref" href="C1.C1Preview.LineDef.Color.html#C1_C1Preview_LineDef_Color">Color</a>,
<a class="xref" href="C1.C1Preview.LineDef.BackColor.html#C1_C1Preview_LineDef_BackColor">BackColor</a>, <a class="xref" href="C1.C1Preview.LineDef.DashStyle.html#C1_C1Preview_LineDef_DashStyle">DashStyle</a> and
<a class="xref" href="C1.C1Preview.LineDef.DashPattern.html#C1_C1Preview_LineDef_DashPattern">DashPattern</a> properties are the same.
Note that this method does NOT compare the lines' widths.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Parse_System_String_System_Boolean_" data-uid="C1.C1Preview.LineDef.Parse(System.String,System.Boolean)">
          <a class="xref" href="C1.C1Preview.LineDef.Parse.html#C1_C1Preview_LineDef_Parse_System_String_System_Boolean_">Parse(string, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a> object, and initialises it with values
acquired by parsing a string representation of a <a class="xref" href="C1.C1Preview.LineDef.html">LineDef</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_Parse_System_String_System_Boolean_System_ComponentModel_ITypeDescriptorContext_" data-uid="C1.C1Preview.LineDef.Parse(System.String,System.Boolean,System.ComponentModel.ITypeDescriptorContext)">
          <a class="xref" href="C1.C1Preview.LineDef.Parse.html#C1_C1Preview_LineDef_Parse_System_String_System_Boolean_System_ComponentModel_ITypeDescriptorContext_">Parse(string, bool, ITypeDescriptorContext)</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use only.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_LineDef_ToString" data-uid="C1.C1Preview.LineDef.ToString">
          <a class="xref" href="C1.C1Preview.LineDef.ToString.html#C1_C1Preview_LineDef_ToString">ToString()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a string that represents the current object.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
