Previous Document Next Document

Object Model Reference : Classes : F : FountainFill : Properties : FountainFill.Steps


FountainFill.Steps

Property Steps As Long

Description

Member of FountainFill

The Steps property returns or specifies the number of steps in a fountain fill. The value can range from 2 to 999. If the value is equal to zero, the default number of steps of the document is used.

VBA example

The following VBA example searches through all shapes on the current page for a fountain fill with a specified number of fountain steps (that is, where the value of the Steps property is not 0). If a shape is selected before this macro is played, the next shape with a fixed number of steps is searched for.

Sub FindFixedSteps()
 Dim s As Shape, id As Long
 Dim bLoop As Boolean
 Set s = ActiveShape
 If s Is Nothing Then
  ' Nothing selected. Get the first shape on the page.
  Set s = ActivePage.Shapes(1)
  If TestShape(s) Then
   s.CreateSelection
   Exit Sub ' Shape Found
  End If
 End If
 id = s.StaticID ' Remember the ID of the selected shape.
 Do
  Set s = s.Next(cdrLevelPage, True, True) ' Get the next shape.
  If TestShape(s) Then
   s.CreateSelection
   Exit Sub ' Shape Found
  End If
 Loop While id <> s.StaticID ' Loop until we find the selected shape again.
 MsgBox "Shape not found", vbCritical
End Sub
' The following function is used to check whether the current shape is the one
' we are looking for.
Private Function TestShape(s As Shape) As Boolean
 Dim b As Boolean
 b = False
 If s.Fill.Type = cdrFountainFill Then
  If s.Fill.Fountain.Steps <> 0 Then b = True
 End If
 TestShape = b
End Function

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.