Previous Document Next Document
Shape.CreateBlend

Function CreateBlend(Shape As Shape, [Steps As Integer = 20], [ColorBlendType As cdrFountainFillBlendType = cdrDirectFountainFillBlend], [Mode As cdrBlendMode = cdrBlendSteps], [Spacing As Double], [Angle As Double], [Loop As Boolean = False], [Path As Shape], [RotateShapes As Boolean = False], [SpacingAccel As Long], [ColorAccel As Long], [AccelSize As Boolean = False]) As Effect

Member of Shape

The CreateBlend method creates a blend between two shapes. This method returns an Effect object that represents the blend-effect properties.

Parameters
Description
Shape
Specifies the starting shape
Steps
Specifies the number of steps
This parameter is optional, and its default value is 20.
ColorBlendType
Specifies the color blend type of a fountain-fill blend type. This property returns cdrFountainFillBlendType.
This parameter is optional, and its default value is cdrDirectFountainFillBlend (0).
Mode
Specifies the blend mode. This property returns cdrBlendMode.
This parameter is optional, and its default value is cdrBlendSteps (0).
Spacing
Specifies the blend spacing
This parameter is optional, and its default value is 0.
Angle
Specifies the angle in a blend effect
This parameter is optional, and its default value is 0.
Loop
Determines whether a blend loops
This parameter is optional, and its default value is False.
Path
Specifies the blend path
This parameter is optional, and its default value is Nothing.
RotateShapes
Determines whether the blend effect rotates its shape to follow a path
This parameter is optional, and its default value is False.
SpacingAccel
Specifies the rate of object acceleration
This parameter is optional, and its default value is 0.
ColorAccel
Specifies the rate of color acceleration. Higher numbers allow the colors to move quicker through the spectrum as they approach the end object.
This parameter is optional, and its default value is 0.
AccelSize
Determines whether the size of a blend accelerates along the path
This parameter is optional, and its default value is False.

The following code example creates a blend on path between two ellipses:

Sub Test() 
 Dim sPath As Shape, s1 As Shape, s2 As Shape 
 Dim eff As Effect 
 Set sPath = ActiveLayer.CreateCurveSegment(1, 6.5, 5, 8.5, 2, 72, 
1.8, 180) 
 Set s1 = ActiveLayer.CreateEllipse(0.953386, 6.731929, 1.838858, 
6.027165) 
 s1.Fill.UniformColor.CMYKAssign 0, 100, 100, 0 
 Set s2 = ActiveLayer.CreateEllipse(4.838622, 9.045, 5.597598, 
8.21374) 
 s2.Fill.UniformColor.CMYKAssign 0, 0, 100, 0 
 Set eff = s2.CreateBlend(s1, 10) 
 eff.Blend.Path = sPath 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.