Fill

Overview

Fill is a class in Aspose.Words FOSS for .NET.

Represents fill formatting for an object.

This class provides 12 methods for working with Fill objects in .NET programs. Available methods include: OneColorGradient, Patterned, PresetTextured, SetImage, Solid, TwoColorGradient. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: BackColor, BackThemeColor, BackTintAndShade, BaseForeColor, Color, FillType, and 15 more.

Properties

NameTypeAccessDescription
PresetTexturePresetTextureReadGets a PresetTexture for the fill.
PatternPatternTypeReadGets a PatternType for the fill.
TextureAlignmentTextureAlignmentRead/WriteGets or sets the alignment for tile texture fill.
ColorColorRead/WriteGets or sets a Color object that represents the foreground color for the fill.
OpacitydoubleRead/WriteGets or sets the degree of opacity of the specified fill as a value between 0.0 (clear) and 1.0 (opaque).
ImageBytesbyte[]ReadGets the raw bytes of the fill texture or pattern.
ForeColorColorRead/WriteGets or sets a Color object that represents the foreground color for the fill.
BaseForeColorColorReadGets a Color object that represents the base foreground color for the fill without any modifiers.
BackColorColorRead/WriteGets or sets a Color object that represents the background color for the fill.
ForeThemeColorThemeColorRead/WriteGets or sets a ThemeColor object that represents the foreground color for the fill.
BackThemeColorThemeColorRead/WriteGets or sets a ThemeColor object that represents the background color for the fill.
ForeTintAndShadedoubleRead/WriteGets or sets a double value that lightens or darkens the foreground color.
BackTintAndShadedoubleRead/WriteGets or sets a double value that lightens or darkens the background color.
VisibleboolRead/WriteGets or sets value that is true if the formatting applied to this instance, is visible.
TransparencydoubleRead/WriteGets or sets the degree of transparency of the specified fill as a value between 0.0 (opaque) and 1.0 (clear).
RotateWithObjectboolRead/WriteGets or sets whether the fill rotates with the specified object.
FillTypeFillTypeReadGets a fill type.
GradientAngledoubleRead/WriteGets or sets the angle of the gradient fill.
GradientVariantGradientVariantReadGets the gradient variant GradientVariant for the fill.
GradientStyleGradientStyleReadGets the gradient style GradientStyle for the fill.
GradientStopsGradientStopCollectionReadGets a collection of GradientStop objects for the fill.

Methods

SignatureDescription
Solid()Sets the fill to a uniform color.
Solid(color: Color)Sets the fill to a specified uniform color.
PresetTextured(presetTexture: PresetTexture)Sets the fill to a preset texture.
Patterned(patternType: PatternType)Sets the specified fill to a pattern.
Patterned(patternType: PatternType, foreColor: Color, backColor: Color)Sets the specified fill to a pattern.
OneColorGradient(style: GradientStyle, variant: GradientVariant, degree: double)Sets the specified fill to a one-color gradient.
OneColorGradient(color: Color, style: GradientStyle, variant: GradientVariant, degree: double)Sets the specified fill to a one-color gradient using the specified color.
TwoColorGradient(style: GradientStyle, variant: GradientVariant)Sets the specified fill to a two-color gradient.
TwoColorGradient(color1: Color, color2: Color, style: GradientStyle, variant: GradientVariant)Sets the specified fill to a two-color gradient.
SetImage(fileName: string)Changes the fill type to single image.
SetImage(stream: Stream)Changes the fill type to single image.
SetImage(imageBytes: byte[])Changes the fill type to single image.

See Also