Object Model Reference : Classes : F : FountainColors : Methods : FountainColors.Add |
Sub Add(Color As Color, Position As Long)
Member of FountainColors
The Add method places a new color point at the specified position. If there is a color point at the specified position, the new color point replaces the existing color point. Valid positions range from 1 to 99.
The following VBA example creates a rectangle and applies a linear fountain fill to it. It then adds two color points to the fill: yellow at 30%, and cyan at 60%.
Sub Test() |
Dim s As Shape |
Set s = ActiveLayer.CreateRectangle(1, 1, 4, 3) |
With s.Fill.ApplyFountainFill(CreateRGBColor(0, 0, 0), CreateRGBColor(255, 0, 0)) |
.Colors.Add CreateRGBColor(255, 255, 0), 30 |
.Colors.Add CreateRGBColor(0, 255, 255), 60 |
End With |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.