API Documentation > CorelDRAW > 2025-v26 > Fill > IVGFill
Fill.ApplyFountainFill method
Apply a Fountain Fill to the shape
Syntax:
Function 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) As FountainFill
Parameters:
Name Type Description
StartColor
Specifies the starting color of the fountain fill.
EndColor
Specifies the ending color of the fountain fill effect.
Type
Specifies the type of the fountain fill through a value of cdrFountainFillType.
Angle
Double
Specifies the angle in linear, conical, or square fountain fills. Positive values rotate the fill counterclockwise; negative values rotate it clockwise.
Steps
Long
Specifies the number of steps in the fountain fill.
EdgePad
Long
Specifies the length of the edge pad of linear, radial, and square fountain fills.
MidPoint
Long
Specifies the point at which two colors in a fountain fill converge. This value is expressed as a percentage.
BlendType
Specifies the type of fountain-fill blend.
CenterOffsetX
Double
Specifies a horizontal offset for the center of the fountain fill.
CenterOffsetY
Double
Specifies a vertical offset for the center of the fountain fill.
Remarks:
The ApplyFountainFill method applies a fountain fill to an object.
Examples:
The following VBA example creates a rectangle and applies a fountain fill that blends from red to yellow:
Sub Test()
Dim s As Shape
Set s = ActiveLayer.CreateRectangle(0, 0, 5, 5)
s.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(255, 255, 0) 
End Sub