Document Solutions for Word
GrapeCity.Documents.Word Assembly / GrapeCity.Documents.Word Namespace / GradientFill Class
Properties Methods

In This Topic
    GradientFill Class Members
    In This Topic

    The following tables list the members exposed by GradientFill.

    Public Properties
     NameDescription
    Public PropertyGets or sets the direction of color change for the gradient in degrees 0..360.

    To define this angle, let its value be x measured clockwise.

    Then ( -sin x, cos x ) is a vector parallel to the line of constant color in the gradient fill.

    This property has effect only when the Type property is GradientType.Linear.

     
    Public PropertyGets or sets whether the gradient angle scales with the fill region.

    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).

    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.

    So a 45-degree gradient angle always give a gradient band whose line of constant color is parallel to the vector (1, -1).

    This property has effect only when the Type property is GradientType.Linear.

     
    Public PropertyGets the "focus" rectangle for the center shade, specified relative to the fill tile rectangle.

    The center shade fills the entire tile except the margins specified by each property.

    Each edge of the center shade rectangle is defined by a percentage offset from the corresponding edge of the tile rectangle.

    A positive percentage specifies an inset, while a negative percentage specifies an outset.

    This property has NO effect if the Type property is GradientType.Linear.

     
    Public Property Gets or sets whether the fill rotates along with the object when the object is rotated.  
    Public Property Gets the list of gradient stops that specify the gradient colors and their relative positions in the color band.  
    Public PropertyGets or sets the direction(s) in which to flip the gradient while tiling.

    Normally a gradient fill encompasses the entire bounding box of the object which contains the fill.

    However, with the TileRectangle property, it is possible to define a "tile" rectangle which is smaller than the bounding box.

    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.

    This property has effect if the Type property is GradientType.Rectangle or GradientType.Circle.

     
    Public PropertyGets a rectangular region of the object to which the gradient is applied.

    This region is then tiled across the remaining area of the object to complete the fill.

    The tile rectangle is defined by percentage offsets from the sides of the shape's bounding box.

    Each edge of the tile rectangle is defined by a percentage offset from the corresponding edge of the bounding box.

    A positive percentage specifies an inset, while a negative percentage specifies an outset.

    This property has effect if the Type property is GradientType.Rectangle or GradientType.Circle.

     
    Public Property Gets or sets the gradient fill type.  
    Top
    Public Methods
     NameDescription
    Public Method Applies a predefined circle gradient fill direction.  
    Public Method Applies a predefined linear gradient fill direction.  
    Public Method Applies a preset gradient.  
    Public Method Applies the predefined rectangle gradient fill direction.  
    Public Method Clears direct formatting in the object. (Inherited from GrapeCity.Documents.Word.FormattingBag)
    Public Method  
    Public MethodServes as the default hash function.  
    Top
    See Also