Object Model Reference : Classes : F : FountainColors : Methods : FountainColors.AddGrayLevel |
Sub AddGrayLevel(GrayLevel As Long, Position As Long)
Member of FountainColors
The AddGrayLevel method adds a new grayscale color point at a 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 an ellipse containing a fountain fill with a fountain transparency containing five interleaving transparency points:
Sub Test() |
Dim s As Shape |
Dim ff As FountainFill |
Dim n As Long |
Set s = ActiveLayer.CreateEllipse2(4, 5.5, 4) |
s.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(255, 255, 0), , 90 |
Set ff = s.Transparency.ApplyFountainTransparency(100, 100) |
For n = 1 To 5 |
ff.Colors.AddGrayLevel (n Mod 2) * 255, n * 100 / 6 |
Next n |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.