Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.CreateBlend


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

Description

Member of Shape

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

Parameter
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, and returns cdrFountainFillBlendType. This parameter is optional, and its default value is cdrDirectFountainFillBlend (0).
Mode
Specifies the blend mode, and 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 blend angle. This parameter is optional, and its default value is 0.
Loop
Specifies whether the 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
Specifies whether the blend 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 more quickly through the spectrum as they approach the end object. This parameter is optional, and its default value is 0.
AccelSize
Specifies whether the size of the blend accelerates along the path. This parameter is optional, and its default value is False.

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.