MsoFillFormat

MsoFillFormat class

Represents fill formatting for a shape.

class MsoFillFormat;

Properties

PropertyTypeDescription
foreColorColorGets and sets the fill fore color.
transparencynumberReturns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).
backColorColorGets and sets the file back color.
imageDataUint8ArrayGets and sets the Texture and Picture fill data.
textureTextureTypeReadonly. Gets the texture fill type.
isVisiblebooleanIndicates whether there is fill.

Methods

MethodDescription
setOneColorGradient(Color, number, GradientStyleType, number)Sets the specified fill to a one-color gradient.

foreColor

Gets and sets the fill fore color.

foreColor : Color;

transparency

Returns or sets the degree of transparency of the specified fill as a value from 0.0 (opaque) through 1.0 (clear).

transparency : number;

backColor

Gets and sets the file back color.

backColor : Color;

imageData

Gets and sets the Texture and Picture fill data.

imageData : Uint8Array;

texture

Readonly. Gets the texture fill type.

texture : TextureType;

isVisible

Indicates whether there is fill.

isVisible : boolean;

setOneColorGradient(Color, number, GradientStyleType, number)

Sets the specified fill to a one-color gradient.

setOneColorGradient(color: Color, degree: number, style: GradientStyleType, variant: number) : void;

Parameters:

ParameterTypeDescription
colorColorOne gradient color.
degreenumberThe gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
styleGradientStyleTypeGradient shading style.
variantnumberThe gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.