Previous Document Next Document

Object Model Reference : Classes : F : FountainColors : Methods : FountainColors.AddGrayLevel


FountainColors.AddGrayLevel

Sub AddGrayLevel(GrayLevel As Long, Position As Long)

Description

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.

Parameter
Description
GrayLevel
Specifies the transparency level for the fountain transparency. The Index value can range from 0 to Count+1, where 0 is the starting color point and Count+1 is the ending color point in the fountain or transparency.
Position
Specifies the location of gray level in the FountainColors collection. If a color is given the position of 2, it is actually the third color point in the fountain effect because the starting point holds an index of 0 and is not included as a collection point. Valid positions range from 1 to 99.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.