Object Model Reference : Classes : F : FountainColor : Methods : FountainColor.Move |
Sub Move(NewPosition As Long)
Member of FountainColor
The Move method moves a color point to a specified position. If there is a color point at the specified position, it is replaced by the moved color point.
Parameter
|
Description
|
NewPosition
|
Specifies the new location of a color point. Valid positions range from 1 to 99.
|
The following VBA example redistributes color points evenly within the selected fountain fill.
Sub Test() |
Dim n As Long, i As Long |
If ActiveShape.Fill.Type <> cdrFountainFill Then |
MsgBox "The selected shape must have a fountain fill." |
Exit Sub |
End If |
n = ActiveShape.Fill.Fountain.Colors.Count |
If n > 0 Then |
For i = 1 To n |
ActiveShape.Fill.Fountain.Colors(i).Move i * 100 / (n + 1) |
Next i |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.