API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.ApplyFountainFill method
Apply a Fountain Fill to all shapes in the range
Syntax:
Sub ApplyFountainFill(Optional ByVal StartColor As Color = Nothing, Optional ByVal EndColor As Color = Nothing, Optional ByVal Type As cdrFountainFillType = cdrLinearFountainFill, Optional ByVal Angle As Double = 0, Optional ByVal Steps As Long = 0, Optional ByVal EdgePad As Long = 0, Optional ByVal MidPoint As Long = 50, Optional ByVal BlendType As cdrFountainFillBlendType = cdrDirectFountainFillBlend, Optional ByVal CenterOffsetX As Double = 0, Optional ByVal CenterOffsetY As Double = 0)
Parameters:
Name Type Description
StartColor
Specifes the color to appear at the beginning of the fountain fill.
EndColor
Specifies the color to appear at the end of the fountain fill.
Type
Specifies the type of fountain fill, and returns cdrFountainFillType.
Angle
Double
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.
Steps
Long
Specifies the number of bands (steps) used to display the fountain fill.
EdgePad
Long
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.
MidPoint
Long
Specifies an imaginary line between two colors in the fountain fill, letting you set the point at which two colors in the fill converge.
BlendType
Specifies the type of blend for the fountain fill.
CenterOffsetX
Double
Specifies the horizontal offset of the fountain fill.
CenterOffsetY
Double
Specifies the vertical offset of the fountain fill.
Remarks:
The ApplyFountainFill method applies a specified fountain fill to the shapes in a shape range.
Examples:
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