Object Model Reference : Classes : F : FountainFill : Properties : FountainFill.BlendType |
Property BlendType As cdrFountainFillBlendType
Member of FountainFill
The BlendType property returns or specifies the type of color blending in a fountain fill.
This value returns cdrFountainFillBlendType.
The following VBA example counts the total number of shapes with fountain fills in the active document and lists the number of shapes of each different type of fountain-color blend.
Sub Test() |
Dim s As Shape |
Dim nDirect As Long, nCW As Long, nCCW As Long, nCustom As Long |
Dim nCount As Long |
nDirect = 0: nCW = 0: nCCW = 0: nCustom = 0 |
nCount = 0 |
For Each s In ActivePage.Shapes |
If s.Fill.Type = cdrFountainFill Then |
Select Case s.Fill.Fountain.BlendType |
Case cdrRainbowCWFountainFillBlend |
nCW = nCW + 1 |
Case cdrRainbowCCWFountainFillBlend |
nCCW = nCCW + 1 |
Case cdrDirectFountainFillBlend |
nDirect = nDirect + 1 |
Case cdrCustomFountainFillBlend |
nCustom = nCustom + 1 |
End Select |
nCount = nCount + 1 |
End If |
Next s |
MsgBox "The document contains " & nCount & " shape(s) with fountain fill including:" & vbCr & _ |
nCustom & " with custom color blend" & vbCr & _ |
nDirect & " with direct color blend" & vbCr & _ |
nCW & " with clockwise color blend" & vbCr & _ |
nCCW & " with counterclockwise color blend" |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.