对象 (发布服务器)FillFormat Object (Publisher)

代表形状的填充格式设置。Represents fill formatting for a shape. 形状可以具有纯色、渐变、纹理、图案、图片或半透明的填充。A shape can have a solid, gradient, texture, pattern, picture, or semitransparent fill.

注解Remarks

许多FillFormat对象的属性是只读的。Many of the properties of the FillFormat object are read-only. 若要设置这些属性,必须应用相应的方法。To set one of these properties, you have to apply the corresponding method.

示例Example

使用**Fill** 属性可返回FillFormat对象。Use the Fill property to return a FillFormat object. 下面的示例向活动文档添加一个形状,然后设置渐变和形状的填充颜色。The following example adds a shape to the active document and then sets the gradient and color for the shape's fill.

Sub AddShapeAndSetFill() 
 With ActiveDocument.Pages(1).Shapes.AddShape(Type:=msoShapeHeart, _ 
 Left:=90, Top:=90, Width:=90, Height:=80).Fill 
 .ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=0) 
 .OneColorGradient Style:=msoGradientHorizontal, _ 
 Variant:=1, Degree:=1 
 End With 
End Sub

方法Methods

名称Name
OneColorGradientOneColorGradient
带图案Patterned
PresetGradientPresetGradient
PresetTexturedPresetTextured
实线Solid
TwoColorGradientTwoColorGradient
UserPictureUserPicture
UserTexturedUserTextured

属性Properties

名称Name
应用程序Application
BackColorBackColor
ForeColorForeColor
GradientAngleGradientAngle
GradientColorTypeGradientColorType
GradientDegreeGradientDegree
GradientStyleGradientStyle
GradientVariantGradientVariant
父级Parent
模式Pattern
PresetGradientTypePresetGradientType
PresetTexturePresetTexture
RotateWithObjectRotateWithObject
TextureAlignmentTextureAlignment
TextureHorizontalScaleTextureHorizontalScale
TextureNameTextureName
TextureOffsetXTextureOffsetX
TextureOffsetYTextureOffsetY
TextureTypeTextureType
TextureVerticalScaleTextureVerticalScale
透明度Transparency
类型Type
可见Visible