API Documentation > CorelDRAW > 2025-v26 > FountainFill > IVGFountainFill
FountainFill.Translate method
Moves Start and End points
Syntax:
Sub Translate(ByVal x As Double, ByVal y As Double)
Parameters:
Name Type Description
x
Double
y
Double
Remarks:
The Translate method repositions the fountain-fill vector. Both the starting and ending points of the fountain fill vector are moved by the specified offset.
Examples:
The following VBA example centers a fountain fill in the active shape (by placing the center of the fill in the center of the shape).
Sub Test()
Dim ff As FountainFill
Dim cx As Double, cy As Double ' Current position of fill center
Dim sx As Double, sy As Double ' Shape's center
If ActiveShape.Fill.Type = cdrFountainFill Then
  Set ff = ActiveShape.Fill.Fountain
  Select Case ff.Type

 Case cdrSquareFountainFill, cdrRadialFountainFill, cdrConicalFountainFill


cx = ff.StartX


cy = ff.StartY

 Case cdrLinearFountainFill


cx = (ff.StartX + ff.EndX) / 2


cy = (ff.StartY + ff.EndY) / 2
  End Select
  ActiveDocument.ReferencePoint = cdrCenter
  ActiveShape.GetPosition sx, sy
  ff.Translate sx - cx, sy - cy
End If 
End Sub