Previous Document Next Document

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


Shape.CreateContour

Function CreateContour([Direction As cdrContourDirection = cdrContourOutside], [Offset As Double], [Steps As Long = 1], [BlendType As cdrFountainFillBlendType = cdrDirectFountainFillBlend], [OutlineColor As Color], [FillColor As Color], [FillColor2 As Color], [SpacingAccel As Long], [ColorAccel As Long]) As Effect

Description

Member of Shape

The CreateContour method applies a contour to a shape, returning an Effect object that represents contour properties.

Parameter
Description
Direction
Specifies the direction of the contour, and returns cdrContourDirection. This parameter is optional, and its default value is cdrContourOutside (1).
Offset
Specifies the offset distance, in document units, between contour lines, automatically adjusting the number of contour steps. This parameter is optional, and its default value is 0.
Steps
Specifies the number of steps, which is linked to the number of lines that appear in the effect. This parameter is optional, and its default value is 1.
BlendType
Specifies the color-blend type, and returns cdrFountainFillBlendType. This parameter is optional, and its default value is cdrDirectFountainFillBlend (0).
OutlineColor
Specifies the contour’s outline color. This parameter is optional, and its default value is Nothing.
FillColor
Specifies the contour’s fill color. This parameter is optional, and its default value is Nothing.
FillColor2
Specifies the EffectContour.FillColorTo color. This parameter is optional, and its default value is Nothing.
SpacingAccel
Specifies the change in step size. This parameter is optional, and its default value is 0.
ColorAccel
Specifies the acceleration of the color change. This parameter is optional, and its default value is 0.

VBA example

The following VBA example creates a text string and applies a contour effect to it, resulting in blurred look.

Sub Test()
 Dim sText As Shape
 Set sText = ActiveLayer.CreateArtisticText(4, 5, "Blurred Text")
 sText.Fill.UniformColor.RGBAssign 0, 0, 0
 With sText.Text.FontProperties
  .Name = "Arial"
  .Size = 90
  .Style = cdrBoldFontStyle
 End With
 sText.Text.AlignProperties.Alignment = cdrCenterAlignment
 sText.CreateContour cdrContourOutside, 0.01, 10, , , CreateRGBColor(255, 255, 255)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.