# GrapeCity.Drawing.Rectangle

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Drawing_Rectangle" data-uid="GrapeCity.Drawing.Rectangle" class="text-break">Rectangle Struct
</h1>
  <div class="markdown level0 summary"><p>Stores a set of four integers that represent the coordinates of a rectangle.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Drawing.html">GrapeCity.Drawing</a></h6>
  <h6><strong>Assembly</strong>: GrapeCity.Spreadsheet.dll</h6>
  <h5 id="GrapeCity_Drawing_Rectangle_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public struct Rectangle</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Structure Rectangle</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="GrapeCity_Drawing_Rectangle__ctor_GrapeCity_Drawing_Point_GrapeCity_Drawing_Size_" data-uid="GrapeCity.Drawing.Rectangle.#ctor(GrapeCity.Drawing.Point,GrapeCity.Drawing.Size)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.-ctor.html#GrapeCity_Drawing_Rectangle__ctor_GrapeCity_Drawing_Point_GrapeCity_Drawing_Size_">Rectangle(Point, Size)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> struct with the specified coordinates and size.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle__ctor_System_Double_System_Double_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.#ctor(System.Double,System.Double,System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.-ctor.html#GrapeCity_Drawing_Rectangle__ctor_System_Double_System_Double_System_Double_System_Double_">Rectangle(double, double, double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> struct with the specified coordinates.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Empty" data-uid="GrapeCity.Drawing.Rectangle.Empty">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Empty.html">Empty</a>
        </td>
        <td class="markdown level1 summary"><p>Represents a <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure with its properties left uninitialized.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Invalid" data-uid="GrapeCity.Drawing.Rectangle.Invalid">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Invalid.html">Invalid</a>
        </td>
        <td class="markdown level1 summary"><p>Represents an invalid <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</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="GrapeCity_Drawing_Rectangle_Bottom" data-uid="GrapeCity.Drawing.Rectangle.Bottom">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Bottom.html#GrapeCity_Drawing_Rectangle_Bottom">Bottom</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the y-coordinate that is the sum of <a class="xref" href="GrapeCity.Drawing.Rectangle.Top.html#GrapeCity_Drawing_Rectangle_Top">Top</a> and <a class="xref" href="GrapeCity.Drawing.Rectangle.Height.html#GrapeCity_Drawing_Rectangle_Height">Height</a> property values of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Height" data-uid="GrapeCity.Drawing.Rectangle.Height">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Height.html#GrapeCity_Drawing_Rectangle_Height">Height</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the height of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_IsEmpty" data-uid="GrapeCity.Drawing.Rectangle.IsEmpty">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.IsEmpty.html#GrapeCity_Drawing_Rectangle_IsEmpty">IsEmpty</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> is empty.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_IsInvalid" data-uid="GrapeCity.Drawing.Rectangle.IsInvalid">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.IsInvalid.html#GrapeCity_Drawing_Rectangle_IsInvalid">IsInvalid</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether this  <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> is invalid.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Left" data-uid="GrapeCity.Drawing.Rectangle.Left">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Left.html#GrapeCity_Drawing_Rectangle_Left">Left</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the x-coordinate of the left edge of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Location" data-uid="GrapeCity.Drawing.Rectangle.Location">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Location.html#GrapeCity_Drawing_Rectangle_Location">Location</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the coordinates of the upper-left corner of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Right" data-uid="GrapeCity.Drawing.Rectangle.Right">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Right.html#GrapeCity_Drawing_Rectangle_Right">Right</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the x-coordinate that is the sum of <a class="xref" href="GrapeCity.Drawing.Rectangle.Left.html#GrapeCity_Drawing_Rectangle_Left">Left</a> and <a class="xref" href="GrapeCity.Drawing.Rectangle.Width.html#GrapeCity_Drawing_Rectangle_Width">Width</a> property values of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Size" data-uid="GrapeCity.Drawing.Rectangle.Size">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Size.html#GrapeCity_Drawing_Rectangle_Size">Size</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="GrapeCity.Drawing.Rectangle.Size.html#GrapeCity_Drawing_Rectangle_Size">Size</a> value that represents the width and height of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Top" data-uid="GrapeCity.Drawing.Rectangle.Top">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Top.html#GrapeCity_Drawing_Rectangle_Top">Top</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the y-coordinate of the top edge of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Width" data-uid="GrapeCity.Drawing.Rectangle.Width">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Width.html#GrapeCity_Drawing_Rectangle_Width">Width</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the width of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_X" data-uid="GrapeCity.Drawing.Rectangle.X">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.X.html#GrapeCity_Drawing_Rectangle_X">X</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the x-coordinate of the left edge of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Y" data-uid="GrapeCity.Drawing.Rectangle.Y">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Y.html#GrapeCity_Drawing_Rectangle_Y">Y</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the y-coordinate of the top edge of this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</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="GrapeCity_Drawing_Rectangle_Contains_GrapeCity_Drawing_Rectangle_" data-uid="GrapeCity.Drawing.Rectangle.Contains(GrapeCity.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Contains.html#GrapeCity_Drawing_Rectangle_Contains_GrapeCity_Drawing_Rectangle_">Contains(Rectangle)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Contains_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.Contains(System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Contains.html#GrapeCity_Drawing_Rectangle_Contains_System_Double_System_Double_">Contains(double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines if the specified point is contained within this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_GetAlignRectangle_System_Double_System_Double_GrapeCity_Drawing_RectAlignment_" data-uid="GrapeCity.Drawing.Rectangle.GetAlignRectangle(System.Double,System.Double,GrapeCity.Drawing.RectAlignment)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.GetAlignRectangle.html#GrapeCity_Drawing_Rectangle_GetAlignRectangle_System_Double_System_Double_GrapeCity_Drawing_RectAlignment_">GetAlignRectangle(double, double, RectAlignment)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the aligned rectangle.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Inflate_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.Inflate(System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Inflate.html#GrapeCity_Drawing_Rectangle_Inflate_System_Double_System_Double_">Inflate(double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Enlarges a Rectangle structure by the specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Intersect_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_" data-uid="GrapeCity.Drawing.Rectangle.Intersect(GrapeCity.Drawing.Rectangle,GrapeCity.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Intersect.html#GrapeCity_Drawing_Rectangle_Intersect_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_">Intersect(Rectangle, Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a rectangle that represents the intersetion between a and
b. If there is no intersection, null is returned.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_IntersectsWith_GrapeCity_Drawing_Rectangle_" data-uid="GrapeCity.Drawing.Rectangle.IntersectsWith(GrapeCity.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.IntersectsWith.html#GrapeCity_Drawing_Rectangle_IntersectsWith_GrapeCity_Drawing_Rectangle_">IntersectsWith(Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines if this rectangle intersects with <code class="paramref">rect</code>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Offset_GrapeCity_Drawing_Point_" data-uid="GrapeCity.Drawing.Rectangle.Offset(GrapeCity.Drawing.Point)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Offset.html#GrapeCity_Drawing_Rectangle_Offset_GrapeCity_Drawing_Point_">Offset(Point)</a>
        </td>
        <td class="markdown level1 summary"><p>Adjusts the location of this rectangle by the specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Offset_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.Offset(System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Offset.html#GrapeCity_Drawing_Rectangle_Offset_System_Double_System_Double_">Offset(double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Adjusts the location of this rectangle by the specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Round" data-uid="GrapeCity.Drawing.Rectangle.Round">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Round.html#GrapeCity_Drawing_Rectangle_Round">Round()</a>
        </td>
        <td class="markdown level1 summary"><p>Rounds all boundaries to the nearest integral value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Round_System_Int32_" data-uid="GrapeCity.Drawing.Rectangle.Round(System.Int32)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Round.html#GrapeCity_Drawing_Rectangle_Round_System_Int32_">Round(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Rounds all boundaries to the nearest integral value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Scale_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.Scale(System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Scale.html#GrapeCity_Drawing_Rectangle_Scale_System_Double_System_Double_">Scale(double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Scales this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> value by the specified <code class="paramref">scaleX</code> and <code class="paramref">scaleY</code> values.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_ToRect" data-uid="GrapeCity.Drawing.Rectangle.ToRect">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.ToRect.html#GrapeCity_Drawing_Rectangle_ToRect">ToRect()</a>
        </td>
        <td class="markdown level1 summary"><p>Converts to <a class="xref" href="GrapeCity.Drawing.Rect.html">Rect</a> value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Translate_System_Double_System_Double_" data-uid="GrapeCity.Drawing.Rectangle.Translate(System.Double,System.Double)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Translate.html#GrapeCity_Drawing_Rectangle_Translate_System_Double_System_Double_">Translate(double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Translates this rectangle by the specified amount of distance.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Union_GrapeCity_Drawing_Rectangle_" data-uid="GrapeCity.Drawing.Rectangle.Union(GrapeCity.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Union.html#GrapeCity_Drawing_Rectangle_Union_GrapeCity_Drawing_Rectangle_">Union(Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Unions the specified <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> value with this <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Drawing_Rectangle_Union_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_" data-uid="GrapeCity.Drawing.Rectangle.Union(GrapeCity.Drawing.Rectangle,GrapeCity.Drawing.Rectangle)">
          <a class="xref" href="GrapeCity.Drawing.Rectangle.Union.html#GrapeCity_Drawing_Rectangle_Union_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_">Union(Rectangle, Rectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structure that contains the union of two <a class="xref" href="GrapeCity.Drawing.Rectangle.html">Rectangle</a> structures.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
