Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.ApplyFountainFill


ShapeRange.ApplyFountainFill

Sub ApplyFountainFill([StartColor As Color], [EndColor As Color], [Type As cdrFountainFillType = cdrLinearFountainFill], [Angle As Double], [Steps As Long], [EdgePad As Long], [MidPoint As Long = 50], [BlendType As cdrFountainFillBlendType = cdrDirectFountainFillBlend], [CenterOffsetX As Double], [CenterOffsetY As Double])

Description

Member of ShapeRange

The ApplyFountainFill method applies a specified fountain fill to the shapes in a shape range.

Parameter
Description
StartColor
Specifes the color to appear at the beginning of the fountain fill. This parameter is optional, and its default value is Nothing.
EndColor
Specifies the color to appear at the end of the fountain fill. This parameter is optional, and its default value is Nothing.
Type
Specifies the type of fountain fill, and returns cdrFountainFillType. This parameter is optional, and its default value is cdrLinearFountainFill (1).
Angle
Specifies the degree of the angle in a linear, conical, or square fountain fill. Changing the angle of gradation affects the slant of the fountain fill. Positive values rotate the fill counterclockwise; negative values rotate it clockwise. This parameter is optional, and its default value is 0.
Steps
Specifies the number of bands (steps) used to display the fountain fill. This parameter is optional, and its default value is 0.
EdgePad
Specifies the length of solid colors at the beginning and end of the fountain fill before they start blending with the next color in the fountain fill. You can change the edge pad of linear, radial, and square fountain fills. Higher values let the colors remain solid longer before blending, causing the colors to spread more quickly; lower values result in a smooth transformation between the two colors. This parameter is optional, and its default value is 0.
MidPoint
Specifies an imaginary line between two colors in the fountain fill, letting you set the point at which two colors in the fill converge. This parameter is optional, and its default value is 50.
BlendType
Specifies the type of blend for the fountain fill. This parameter is optional, and its default value is cdrDirectFountainFillBlend (0).
CenterOffsetX
Specifies the horizontal offset of the fountain fill. This parameter is optional, and its default value is 0.
CenterOffsetY
Specifies the vertical offset of the fountain fill. This parameter is optional, and its default value is 0.

VBA example

The following VBA example applies a conical fountain fill to each text shape on the page.

Sub Test()
 Dim sr As ShapeRange
 Set sr = ActivePage.FindShapes(Type:=cdrTextShape)
 sr.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(255, 255, 0), cdrConicalFountainFill, 45
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.