# GrapeCity.Documents.Word.GradientFill

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Word_GradientFill" data-uid="GrapeCity.Documents.Word.GradientFill" class="text-break">GradientFill Class
</h1>
  <div class="markdown level0 summary"><p>Represents a gradient fill.</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="GrapeCity.Documents.Word.FormattingBag.html">FormattingBag</a></div>
    <div class="level2"><span class="xref">GradientFill</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Word.html">GrapeCity.Documents.Word</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Word.dll</h6>
  <h5 id="GrapeCity_Documents_Word_GradientFill_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class GradientFill : FormattingBag</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class GradientFill
    Inherits FormattingBag</code></pre>
  </div>
  <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_Documents_Word_GradientFill_Angle" data-uid="GrapeCity.Documents.Word.GradientFill.Angle">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Angle.html#GrapeCity_Documents_Word_GradientFill_Angle">Angle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the direction of color change for the gradient in degrees 0..360.</p>
<p>To define this angle, let its value be x measured clockwise.</p>
<p>Then ( -sin x, cos x ) is a vector parallel to the line of constant color in the gradient fill.</p>
<p>This property has effect only when the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a> property is <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Linear">Linear</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_AngleScaled" data-uid="GrapeCity.Documents.Word.GradientFill.AngleScaled">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.AngleScaled.html#GrapeCity_Documents_Word_GradientFill_AngleScaled">AngleScaled</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether the gradient angle scales with the fill region.</p>
<p>Mathematically, if this flag is true, then the gradient vector ( cos x , sin x ) is scaled by the width (w) and height (h) of the fill region, so that the vector becomes ( w cos x, h sin x ) (before normalization).</p>
<p>Observe that now if the gradient angle is 45 degrees, the gradient vector is ( w, h ), which goes from top-left to bottom-right of the fill region. If this flag is false, the gradient angle is independent of the fill region and is not scaled using the manipulation described above.</p>
<p>So a 45-degree gradient angle always give a gradient band whose line of constant color is parallel to the vector (1, -1).</p>
<p>This property has effect only when the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a> property is <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Linear">Linear</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_FillRectangle" data-uid="GrapeCity.Documents.Word.GradientFill.FillRectangle">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.FillRectangle.html#GrapeCity_Documents_Word_GradientFill_FillRectangle">FillRectangle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the &quot;focus&quot; rectangle for the center shade, specified relative to the fill tile rectangle.</p>
<p>The center shade fills the entire tile except the margins specified by each property.</p>
<p>Each edge of the center shade rectangle is defined by a percentage offset from the corresponding edge of the tile rectangle.</p>
<p>A positive percentage specifies an inset, while a negative percentage specifies an outset.</p>
<p>This property has NO effect if the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a> property is <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Linear">Linear</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_RotateWithObject" data-uid="GrapeCity.Documents.Word.GradientFill.RotateWithObject">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.RotateWithObject.html#GrapeCity_Documents_Word_GradientFill_RotateWithObject">RotateWithObject</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether the fill rotates along with the object when the object is rotated.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_Stops" data-uid="GrapeCity.Documents.Word.GradientFill.Stops">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Stops.html#GrapeCity_Documents_Word_GradientFill_Stops">Stops</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the list of gradient stops that specify the gradient colors and their relative positions in the color band.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_TileFlip" data-uid="GrapeCity.Documents.Word.GradientFill.TileFlip">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.TileFlip.html#GrapeCity_Documents_Word_GradientFill_TileFlip">TileFlip</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the direction(s) in which to flip the gradient while tiling.</p>
<p>Normally a gradient fill encompasses the entire bounding box of the object which contains the fill.</p>
<p>However, with the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.TileRectangle.html#GrapeCity_Documents_Word_GradientFill_TileRectangle">TileRectangle</a> property, it is possible to define a "tile" rectangle which is smaller than the bounding box.</p>
<p>In this situation, the gradient fill is encompassed within the tile rectangle, and the tile rectangle is tiled across the bounding box to fill the entire area.</p>
<p>This property has effect if the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a> property is <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Rectangle">Rectangle</a> or <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Circle">Circle</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_TileRectangle" data-uid="GrapeCity.Documents.Word.GradientFill.TileRectangle">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.TileRectangle.html#GrapeCity_Documents_Word_GradientFill_TileRectangle">TileRectangle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a rectangular region of the object to which the gradient is applied.</p>
<p>This region is then tiled across the remaining area of the object to complete the fill.</p>
<p>The tile rectangle is defined by percentage offsets from the sides of the shape's bounding box.</p>
<p>Each edge of the tile rectangle is defined by a percentage offset from the corresponding edge of the bounding box.</p>
<p>A positive percentage specifies an inset, while a negative percentage specifies an outset. </p>
<p>This property has effect if the <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a> property is <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Rectangle">Rectangle</a> or <a class="xref" href="GrapeCity.Documents.Word.GradientType.html#GrapeCity_Documents_Word_GradientType_Circle">Circle</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_Type" data-uid="GrapeCity.Documents.Word.GradientFill.Type">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Type.html#GrapeCity_Documents_Word_GradientFill_Type">Type</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the gradient fill type.</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_Documents_Word_GradientFill_ApplyCircleDirection_GrapeCity_Documents_Word_GradientPathDirection_" data-uid="GrapeCity.Documents.Word.GradientFill.ApplyCircleDirection(GrapeCity.Documents.Word.GradientPathDirection)">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.ApplyCircleDirection.html#GrapeCity_Documents_Word_GradientFill_ApplyCircleDirection_GrapeCity_Documents_Word_GradientPathDirection_">ApplyCircleDirection(GradientPathDirection)</a>
        </td>
        <td class="markdown level1 summary"><p>Applies a predefined circle gradient fill direction.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_ApplyLinearDirection_GrapeCity_Documents_Word_GradientLinearDirection_" data-uid="GrapeCity.Documents.Word.GradientFill.ApplyLinearDirection(GrapeCity.Documents.Word.GradientLinearDirection)">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.ApplyLinearDirection.html#GrapeCity_Documents_Word_GradientFill_ApplyLinearDirection_GrapeCity_Documents_Word_GradientLinearDirection_">ApplyLinearDirection(GradientLinearDirection)</a>
        </td>
        <td class="markdown level1 summary"><p>Applies a predefined linear gradient fill direction.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_ApplyPreset_GrapeCity_Documents_Word_GradientPreset_GrapeCity_Documents_Word_ThemeColorId_" data-uid="GrapeCity.Documents.Word.GradientFill.ApplyPreset(GrapeCity.Documents.Word.GradientPreset,GrapeCity.Documents.Word.ThemeColorId)">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.ApplyPreset.html#GrapeCity_Documents_Word_GradientFill_ApplyPreset_GrapeCity_Documents_Word_GradientPreset_GrapeCity_Documents_Word_ThemeColorId_">ApplyPreset(GradientPreset, ThemeColorId)</a>
        </td>
        <td class="markdown level1 summary"><p>Applies a preset gradient.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_ApplyRectangleDirection_GrapeCity_Documents_Word_GradientPathDirection_" data-uid="GrapeCity.Documents.Word.GradientFill.ApplyRectangleDirection(GrapeCity.Documents.Word.GradientPathDirection)">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.ApplyRectangleDirection.html#GrapeCity_Documents_Word_GradientFill_ApplyRectangleDirection_GrapeCity_Documents_Word_GradientPathDirection_">ApplyRectangleDirection(GradientPathDirection)</a>
        </td>
        <td class="markdown level1 summary"><p>Applies the predefined rectangle gradient fill direction.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_Equals_System_Object_" data-uid="GrapeCity.Documents.Word.GradientFill.Equals(System.Object)">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.Equals.html#GrapeCity_Documents_Word_GradientFill_Equals_System_Object_">Equals(object)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_FixInheritedValues" data-uid="GrapeCity.Documents.Word.GradientFill.FixInheritedValues">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.FixInheritedValues.html#GrapeCity_Documents_Word_GradientFill_FixInheritedValues">FixInheritedValues()</a>
        </td>
        <td class="markdown level1 summary"><p>Fixes all inherited values as &quot;direct&quot; values for this instance.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_GradientFill_GetHashCode" data-uid="GrapeCity.Documents.Word.GradientFill.GetHashCode">
          <a class="xref" href="GrapeCity.Documents.Word.GradientFill.GetHashCode.html#GrapeCity_Documents_Word_GradientFill_GetHashCode">GetHashCode()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>

</div>
